file permissons
Hi
does anyone know what permision i need to give a file to allow users to copy or open but cant delete the file or do i need to give the permisions to the folder |
Quote:
chmod 400 (owner only) chmod 440 (owner-group) chmod 444 (everyone) "man chmod" for more information. |
thanks just what i wanted
|
Hi There,
I think Chmod will not work properly, if permissions are going to be assigned at user level. I mean to say that if a user is trying to alter permissions for another user, then chmod will let you do so. Anyways, this is the detailed description regarding permissions at different levels : 400 read by owner 040 read by group 004 read by anybody (other) 200 write by owner 020 write by group 002 write by anybody 100 execute by owner 010 execute by group 001 execute by anybody Hope this might help you.... Kapil. |
I think putting that file in /tmp folder will do the job. /tmp being a sticky directory wont allow users to delete the file, but they can copy or read the file..
Is it correct what I am saying...? |
Quote:
|
Ok, then create a directory with sticky bit..
chmod 1755 <directory name> |
Yes, I think the best is to create a forder and as root do:
chmod 444 <directory name> ... |
Whether or not a file can be deleted has to do with the permissions of the directory it's in, not the file itself. You could create a file, belonging to root and set its permissions to 000, but if it's in my $HOME directory, I can delete it.
Code:
root /home/telemachus # chown root:root zero See here for more: http://www.albany.edu/faculty/gms/ho...rmissions.html |
I go with Telemachos
|
Mr.Telmachos,
So what do u suggest as the ideal solution for the question generated by mahmoud..Is n't that putting the file in a directory with sticky bit added to it? |
hey mahmoud,use sticky bit on those files
|
hi
Hi frnd,
Simply use sticky bit all users can read and add but canot delte any file from it |
All times are GMT -5. The time now is 07:26 PM. |