user permissions changing after using gedit
Hi
I have a folder that's only supposed to be editable by it's owner and anyone belonging to the dev user group. Hence the folder and it's contents have 775 user permissions. But if you belong to the dev usergroup and edit files, the owner gets changed to the current user and the usergroup gets changed to the curren users default usergroup. Is there a way to stop this I'm using ubuntu gutsy. |
Shouldn't 775 be rwxr-----
|
Either.......Or
Actually what's happen is perfectly logical.
Permissions 775 is rwxrwxr-x, which means that not only the owner but anyone else in the owner's group can edit the file. When they save it, they become the owner. Also, do the files need to be executable. If not, open up a shell in the relevant directory and type: sudo chmod 644 * then run ls -lh You'll see all the file permissions as rw-r--r-- That way, only you'll be able to edit the files. |
It can not be 644 because then all the others could read it and the OP don't want that.
|
Quote:
If permissions are, as linuxmandrake says, 755 - then others can not only read but execute the files. If you don't want others to be able to do anything to the files, you'll have to issue: sudo chmod 640 * You'll then be safe from prying eyes!:tisk: |
Quote:
|
All times are GMT -5. The time now is 01:05 PM. |