View Full Version : File Permissions
Chroder
October 5th, 2002, 08:39
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?
YUPAPA
October 5th, 2002, 09:56
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!!!
GregT
October 5th, 2002, 10:19
make it 755 and u will have no problems.
ShwingHost.com
October 8th, 2002, 17:42
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.
keith
October 8th, 2002, 18:10
yupapa is wrong.
YUPAPA
October 8th, 2002, 18:27
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.
YUPAPA
October 8th, 2002, 18:28
Actually, I misread the first post, my fault.
YUPAPA
October 8th, 2002, 18:32
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...
ShwingHost.com
October 8th, 2002, 18:34
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.
Powered by vBulletin® Version 4.1.7 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.