View previous topic :: View next topic |
Author |
Message |
upengan78 l33t
Joined: 27 Jun 2007 Posts: 711 Location: IL
|
Posted: Thu Oct 11, 2012 10:03 pm Post subject: prevent copy of directory and subdirectories/files under.. |
|
|
Hi,
I am curious if it is possible to restrict users in a group to copy the directory (greoup perms on the directory r-x).
I have about 6 users in a group, say under group - 'freedom' . A directory which has lots of sub directories and files under it , folder name - NOCOPY
Permissions for NOCOPY are:
Code: |
Perms User Group Directory
drwxr-x--- 12 owner freedom NOCOPY |
Currently, if a user in freedom group does 'cp -r NOCOPY <destination> it works. Is there a way to prevent copying but also be able to browse the NOCPY directory(and subdirs).
I am checking if is possible to do it using permissions or ACLs.
Let me know if you can help. Thanks in advance.
Aero |
|
Back to top |
|
|
VinzC Watchman
Joined: 17 Apr 2004 Posts: 5098 Location: Dark side of the mood
|
Posted: Fri Oct 19, 2012 2:37 pm Post subject: |
|
|
Set the owning user and group of the directory to something else than the user and group in question. You may leave modes as-is (i.e. 0750). E.g. set owner and group to root:root. Only root will be allowed to browse that directory, much like the /sbin directory. If you don't want root as an owning user/group, chose whatever else that fits. _________________ Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
1739! |
|
Back to top |
|
|
Genone Retired Dev
Joined: 14 Mar 2003 Posts: 9530 Location: beyond the rim
|
Posted: Tue Oct 30, 2012 10:21 am Post subject: |
|
|
Quote: | Is there a way to prevent copying but also be able to browse the NOCPY directory(and subdirs). |
Not on the directory level, as that's basically just an index, not a container. What you can do is to give people executable and read permissions on directories, but not on files.
If you want them to be able to still view the files you're out of luck: Anything you can read you can also copy. |
|
Back to top |
|
|
upengan78 l33t
Joined: 27 Jun 2007 Posts: 711 Location: IL
|
Posted: Tue Oct 30, 2012 3:29 pm Post subject: |
|
|
Sorry, I didn't come to know about there was first reply to my post. Anyway, thanks guys, so looks like, if I combine first and second reply and configure then I will be very much close to what I want to achieve. |
|
Back to top |
|
|
|