File Permissions between users
Hello Everyone! I'm somewhat new to linux, and getting my feet wet by building my first linux server. :)
So what i have is an application that moves/sorts files. Another program that catalogs them. The problem is that each app uses it's own user. So my question is if there is any way that files owned by prog1user can be read by prog2user? I have tried doing a chmod -R 755 Directory and that has allowed the second program to see the files, but I'm guessing this has certain security risks (although I'm not so worried about the files in this directory). Anyways I was wondering if there was a proper way to do this? OS is debian wheezy. Cheers! |
If one of the usrs only needs read permissions for the files just add that user to the user group of the girst user, that isn't as complicated as it sounds!
|
That doesn't appear to work :(
The directories are created: drwxr-sr-x vbox user DirName all the files within appear as such: -rw-r--r-- 1 vbox users FileName so I checked /etc/group |grep vbox and see: vboxusers:x:115:user1,user2,vbox sortgroup:x:1001:user2,vbox,user1 so user1 (my user) and user2 (cataloging app) account are in the same groups as vbox user. :) So after the sorting is done, the file permission have changed to: -rw-rw---- 1 vbox users FileName So this is where I don't understand. My user (user1) and user2 can see the files, can not delete them. -OK However, the cataloging app, run under the user2 account can not see the files. So this is when I do a chmod 755 FileName, and catalog app picks it up immediately. |
Quote:
Two users being a part of the same group means nothing, except that both users will have group access to files belonging to that group. In this case, the files in question are in the "users" group, so any user that you want to have group access needs to also be a member of the "users" group. |
All times are GMT -5. The time now is 10:44 PM. |