Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have two users, one is an application user, through application is installed and one is a readonly user which is used by users to view log files.
There is an repetitive issue where I have to give permission to certian application logs to 755 recursively to be able to be viewed by user readonly.
Quote:
apps user:
id
uid=60000(apps) gid=8500(dba) groups=8500(dba)
umask
0022
ls -l
-rwxr-xr-x 1 apps dba 630339 Oct 11 15:59 server.log
new files created with this user
touch a; ll a
-rw-r--r-- 1 apps dba 0 Oct 11 16:04 a
Quote:
readonly user
id
uid=502(readonly) gid=54321(oinstall) groups=54321(oinstall),60000(apps)
umask
0022
readonly user has been put into apps group. but could not write to the folder, which works as expected.
touch a
touch: cannot touch `a': Permission denied
But new files are created with permission 644 due to which they are not been able to be viewd by readonly user, and permissions have to be given recursicvely on folder with chmod -R 755 /path/to/log folder to make them viewable by readonly user.
Kindly suggest how to acheive that the files created by apps user in the logs folder will have permission of 755 or 750 so that readonly user can view them.
Any user will be able to read file if there is 'read' permission is available on a file for related group or others. Meanwhile if you want that user to have full permission, then define a new umask value for 'appsuser'. To do this, just add following line at the end appuser's .bashrc or .profile file:
also can you let me know what is the . in front of the file permissions.
The . is to show the condition of any ACLs that may be on the file. A "." indicates no ACLs. If an ACL entry did exist, it would show a + sign. You can retrieve the ACLs associated with a file using "getfacl". On files with no ACL it will just list the user/group/other access modes on three lines. (see manpage on getfacl for more info.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.