How to mark file as read-only when not owner of file
Hi All
I have linux and ACL permissions set on dirs. Is it possible to mark a file as read-only, if the user has not created the file (not owner), but is apart of the group which owns the file and has full permissions on it? If so, how would this be done? Thanks t. |
I would think you could. What happens when you use chmod?
|
You can use the chmod command to modify the permissions. Typing
Code:
man chmod jdk |
Hi and thanks for the responses.
I know how to use the chmod command /set acl permissions to change the file to read only via the command line, but I want a user to be able to mark files as read-only (if they have rwx permissions) via their windows PC (right click the file, and mark as read-only via properties). This only seems to work if the user is the owner of the file... t. |
I too can't seem to do so, even from the shell. That would be a client such as Filezilla couldn't as well.
File is owned by UserA and has permission 775. UserB belongs to UserA group UserB can't seem to change permission to 777. |
From the manpage on the library function "chmod" (man 3 chmod):
Quote:
|
Or you can just copy file and thus take ownership. that way you can change permissions, assuming you have full permission on that file/folder or you are part of shared folder.
|
Quote:
The reason the restriction is there is so that the original owner retains control of that specific file. If the OWNER chooses to grant world access that is his right. But it is not the right of a member of the group to do so. |
Quote:
As admin i come across this very often, i.e., to create a shared folder for some employees so that they can collaborate their work in themselves. Usually those employees are programmers or atleast proficient in linux os. The only few restriction i'm supposed to make is that - they don't delete each-others file, they should not take ownership of that shared folder and other users should not be allowed in to that folder. Rest all should be permitted. Changing permission of file by taking ownership of that file (by copying) is one method they usually do. I am not sure there is a concept of shared owners who can change ownership of file (excluding root). :scratch: |
All times are GMT -5. The time now is 02:52 PM. |