• Howdy! Welcome to our community of more than 130.000 members devoted to web hosting. This is a great place to get special offers from web hosts and post your own requests or ads. To start posting sign up here. Cheers! /Peo, FreeWebSpace.net
managed wordpress hosting

File Permissions

Chroder

New Member
I have a question, lets say you CHMOD a file to 777, does that mean that people, even on a different server can open it, read it and write [over] it?
 
YES! That is why I said to everyone changing perms to 0777 is a really bad idea and most people seems to ignore me! It can screw up the entire script if the config is writable to everyone!!!
 
Correction! Noone on a different server can read/write or change them in any way without the help of your server. That is, they would have to go to some service running on your server and use it to modify those files. If you have permissions 777, that means any user on the given server can write to that file. By any user I mean one that has a record with the system's password database. Services on your box run under one or the other user ID. If that user has access to the file, then this service can open it for reading/writing/execution.
 
oh really?????

Why not try it out then instead of explainning?

1. Create two users with two different uid and gid. Lets say (username: test, test1)
2. Login into both accounts at the same time.
3. Use the 'test' account to create file called 'test.txt' with perms 0777 under his home directory.
4. test1 cd to test's home directory and try to edit his file... pico -w test.txt
5. Save it...

Does it give you any error like permission denied??

I DON"T THINK SO... I can do it even with a perl script!
However, you can't delete the file.
 
If there is suEXEC enabled on the server, you don't even need to change permission to 0777 to write your files... Any perms are writable to you and root...
 
Important part of the original question was if people on a different server could access the file, and I said NO without accessing services running on the box first. And only if services have perms to access the file, then they get it.
 
Back
Top