Link to home
Create AccountLog in
Avatar of powervds
powervds

asked on

Chmod 777 !

Hello,
i want to know how i can disable 777 permissions for folders or files from The Server
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

can you clarify that request?
to change the permissions on a file/folder, you would use chmod command line tool:
http://catcode.com/teachmod/
You can prevent users from changing permissions on certain files but I dont know about forbidding only certain combinations...
Avatar of powervds
powervds

ASKER

Can you tell me how i can do that ?
I think the owner of a file or a directory can always change the perms to whatever he/she wants. The answer to your question is no you can not.

The only way is to hide the chmod command or revoke the execute perm for others, but in this case no one can change perms.
> The only way is to hide the chmod command or revoke the execute perm for others, but in this case no one can change perms.
LOL: perl -e 'chmod(0777, "/path/to/file")'

But omarfarid is right, owner is always allowed to change permissions/acls on it's own file/dir.
Have one individual access to the root account, you.
set  umask 022  - i.e. owner has full rights, group world can not write.

Users can set whatever permissions they wish to their folder files.  Removing the chmod command from being executed by users, will introduce some delay until a person who really wants to use chmod brings in a compatible binary.

We understand the end result that you want.  What are you trying to prevent?
Hi ravenpl,

When I said no one will be able to change permissions when chmod command is not available, I meant with standard commands. Definitely with programming languages you can change it.
ASKER CERTIFIED SOLUTION
Avatar of aeto
aeto
Flag of Singapore image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Thanks
Sincerely Regards
aeto: restricting /bin/chmod access is security by obscurity, which is not security at all.
Please refer previous posts here, how easily it may be overcome...
Thanks for your help .
But how the accepted solution is different from what I said:

"The only way is to hide the chmod command or revoke the execute perm for others, but in this case no one can change perms."