3

I have a "Drop Box" directory for students to submit assignments. Its permissions are set to "drwx-wx---" where all of the students belong to the group. This lets them write to but not read from the folder. I would like to set up ACLs so user cs63 (an account used by the teaching staff) can read all files. I tried doing:

chmod +a "user:cs63 allow read,file_inherit,directory_inherit" Top

on the top-level directory in which all of the Drop Box directories appear. When I look at the attributes with "ls -lde", I see:

user:cs63 allow list,file_inherit,directory_inherit

I assume that "read" was changed to "list" because "read" isn't applicable to directories, but how do I specify that I want cs63 to be able to read, not just list, all of the files?

Also, once I set the right ACL, will it apply to files that have already been submitted or only future ones?

I connect to the server via ssh, so I need to do all of this at the command line.

EDIT:

I tried @mindc's suggestion of:

chmod -R +a "user:cs63 allow read,file_inherit,directory_inherit" Top

It worked for most files, but not for a subdirectory whose permissions were:

drwx---rwx+ student cs63sp12

where user cs63 is a member of cs63sp12. When I do "ls -le" on the subdirectory, I get:

0: user:cs63 allow list,file_inherit,directory_inherit

1 Answer 1

1

Try the -R switch, like this:

chmod -R +a "user:cs63 allow read,file_inherit,directory_inherit" Top
2
  • Thanks very much. That seemed to do it. Could you give me a little explanation to go along with it, and let me know if it would work with future files added to the directories or if I'd have to put it in a cron job? Commented Mar 12, 2012 at 22:32
  • Actually, it didn't quite work. See edit. Commented Mar 12, 2012 at 23:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .