You are not logged in.

#1 2012-06-17 02:37:42

Gen2ly
Member
From: Sevierville, TN
Registered: 2009-03-06
Posts: 1,529
Website

[Solved] Ensure all users have access to directory and files

I'm writing a PKGBUILD thats installing to /usr/share/.../... and building the package is giving me permissions for files and parent folder as root:root and directory/file permissions as 755 and 644 respectively.  Because it looks like the files need to be alterable (at least temporarily), I'd like all users to be able to have the correct permissions for them.  This may cause problems for multiple users on the system because settings may get saved here but I'd still like to be able to do this because people with single-user systems can benefit from this (i.e. I'd be todd:users while someone named joe would be joe:users) to be able to have access.  I've heard of the nobody group before, can I do something like this?:

chown -R nobody:users ${pkgdir}/usr/share/.../...

Any recommendations?

Last edited by Gen2ly (2012-06-19 05:36:33)


Setting Up a Scripting Environment | Proud donor to wikipedia - link

Offline

#2 2012-06-17 21:24:11

olive
Member
From: Belgium
Registered: 2008-06-22
Posts: 1,490

Re: [Solved] Ensure all users have access to directory and files

You can give the files that need to be altered the permission 0666. If you want also to give users permissions to create new files and directories give the directories permissions 0777. Leave the owner as root:root ("nobody" is just another normal user, it is used to run system daemon that for some reason we do not want to run as root). That's said what you are trying is considered bad practise (be also aware that two different users could modify the same file at the same time with unpredicatble results). If it is not fixable in a proper way, you could install the whole package your home directory (without making an arch package), just alter the PATH and possible LD_LIBRARY_PATH). In any case if you decide to make an arch package like this, such a package will not be suitable for distribution.

Last edited by olive (2012-06-17 21:25:38)

Offline

#3 2012-06-19 05:36:09

Gen2ly
Member
From: Sevierville, TN
Registered: 2009-03-06
Posts: 1,529
Website

Re: [Solved] Ensure all users have access to directory and files

Thanks for the through answer olive.  Yeah this is an odd request.  I'll probably just make a note of it in the .install file.  Thanks again.


Setting Up a Scripting Environment | Proud donor to wikipedia - link

Offline

Board footer

Powered by FluxBB