Need Help with Server Setup Commands

0
7
Asked By TechieTom88 On

I'm setting up a server and the instructions I have say to go into a certain folder and run "sudo chmod -R 777 ./" followed by "sudo ./foldername". However, I keep getting an error that says "sudo: ./foldername: command not found".

I have two questions:
1. What does the ./ mean in the first command?
2. If I'm already in the folder, how do I execute it?

I really think there's an error in the instructions, because it seems like it's missing the actual file name for the command I'm trying to run. Thanks in advance for any insight!

2 Answers

Answered By CodeCrafter42 On

The `./` just refers to the current directory, so it’s like saying 'look here for the folder or file.' When you run the `chmod` command with `-R`, you're making everything in that directory accessible, which is risky! The issue with your second command is that you can't run a folder as if it were a file. You need to specify an executable file inside it rather than the folder itself. Double-check your instructions; they might be off!

Answered By ShellScripter99 On

Yeah, running `sudo ./foldername` won’t work unless ‘foldername’ is an executable script or file. The `chmod` part is making everything in that folder writable and executable for everyone, which is generally a bad idea for security. Make sure the instructions are correct because they seem to be missing something important.

TechieTom88 -

Exactly! I think they just left out the file I was supposed to execute from that folder.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.