Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then 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.
Sorry for the long post, but I believe it will help clarify the problem if I explain my set up.
I have added a user to my system (lets call him netuser) that I use for all internet activity. The rationale behind this is that if this user is compromised he has neither root access nor access to my home directory, so the worst that can happen is that netusers home directory is wiped or altered, a trivial thing to repair.
This is achieved using sudo, where I have it set that I can run any command as netuser without a password. Then, by altering the command issued when I click on, for example, galeon, to sudo -H -u netuser galeon, the process is completely transparent.
So far so good. Now what I have tried to do is have all files created in netusers home directory have the permissions set to 664 so that, as a member of netuser's group, I have full access to all files.
I have found that by adding umask 002 to netuser's .bash_profile, using touch in a terminal opened as netuser will create files with the correct permissions, but if I run galeon, either from the netuser terminal or via sudo it creates file permissions of 644.
I have set defaults:netuser umask=0002 in the sudoers file, but it has no effect.
Ummm........got me stumped there, because I don't know what Galeon is, just a shot in the dark here, if galeon is used through a GUI, and you have umask set in .bash_profile, it may be possible the umask setting in bash does not apply to a GUI software suite. I base my assumption on the what you say, "if I click on Galeon" but then you mention a sudo command within the same sentence, this has me a little confused mostly because I know nothing about Galeon. As for firefox, I do know if one was to install latest version Firefox 2, you do have to change permissions of the firefox directory wherever you put it for all to execute, then it has to be linked to bin (sub directory) within the directory you installed firefox. Then set ownership:group to root for firefox directory even when installed in /usr/local where it can be used by anyone. If your using default installed firefox, check with #ls -l <directory firefox> to view permissions.
Can you set a umask value for Galeon? I'm sure that avenue, you already walked.
As I mentioned earlier, I'm no expert, and not knowing anything about Galeon has me thinking everything I wrote in this post may just be useless garble.
Now I re-read your first post.....
Correct me if I'm wrong, but it appears you are not logged in Netuser's account, rather another user account. Theoretically, one would be led to believe that because of the sudo command to start Galeon would apply Netuser's settings, but because the session you are in belongs to another user, I would think the other user's umask value and permissions will ultimately be the settings applied.
If all fails, how about changing your menu entry "sudo -H -u netuser galeon" to use an intermediary script "sudo -H -u netuser /home/netuser/galeon.sh"?:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.