Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
prevent copy of directory and subdirectories/files under..
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
upengan78
l33t
l33t


Joined: 27 Jun 2007
Posts: 711
Location: IL

PostPosted: Thu Oct 11, 2012 10:03 pm    Post subject: prevent copy of directory and subdirectories/files under.. Reply with quote

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
View user's profile Send private message
VinzC
Watchman
Watchman


Joined: 17 Apr 2004
Posts: 5098
Location: Dark side of the mood

PostPosted: Fri Oct 19, 2012 2:37 pm    Post subject: Reply with quote

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
View user's profile Send private message
Genone
Retired Dev
Retired Dev


Joined: 14 Mar 2003
Posts: 9507
Location: beyond the rim

PostPosted: Tue Oct 30, 2012 10:21 am    Post subject: Reply with quote

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
View user's profile Send private message
upengan78
l33t
l33t


Joined: 27 Jun 2007
Posts: 711
Location: IL

PostPosted: Tue Oct 30, 2012 3:29 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum