|
|
| Author |
Message |
< Yaws mailing list ~ Best way of changing file umask of yaws server daemon? |
| Guest |
Posted: Tue Aug 03, 2010 2:04 am |
|
|
|
Guest
|
I would like to have the yaws server write any new files with a umask of
002, so that another user in the yaws group can modify, move, or delete
files created by the yaws server. I am running yaws 1.84 on Ubuntu
10.04.
I did not find any configuration option for the yaws.conf.
I tried adding to the config file /etc/default/yaws
umask 002
but did not work.
I also tried changing the init script, /etc/init.d/yaws:
script="$DAEMON -I $YAWS_ID $@"
to
script="umask 002; $DAEMON -I $YAWS_ID $@"
This did work, but I'm not sure editing the init script is the best way
of making this easy to document and configure on multiple machines.
I also found a reference to the pam_umask module here
(http://muzso.hu/2008/01/22/default-permissions-with-libpam-umask)
and edited /etc/pam.d/common-session, adding the line:
session optional pam_umask.so umask=022
Then running the command:
sudo chfn -o "umask=002" yaws
to add a umask setting to /etc/passwd.
This also worked, but only for non-interactive, non-login shells such as
the yaws server daemon. For login shells you need to also remove umask
setting from /etc/profile, otherwise it overrides settings made by the
pam_umask module.
Which is the better way to set the umask for the yaws server? Or is
there another way?
I have also asked this question on serverfault.com:
http://serverfault.com/questions/166176/ways-to-set-umask-on-ubuntu-for-daemon-processes
Thanks for any other suggestions,
Michael
PS: I apologize if this is duplicated, I tried sending a message earlier
before subscribing to the list.
------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlyaws-list
Post received from mailinglist |
|
|
| Back to top |
|
| Guest |
Posted: Tue Aug 03, 2010 3:33 am |
|
|
|
Guest
|
On Mon, Aug 2, 2010 at 9:45 PM, Michael Foley <michaelf@tracmap.co.nz> wrote:
> I would like to have the yaws server write any new files with a umask of
> 002, so that another user in the yaws group can modify, move, or delete
> files created by the yaws server. |
|
|
| Back to top |
|
| Guest |
Posted: Tue Aug 03, 2010 5:01 am |
|
|
|
Guest
|
On 08/03/2010 05:32 AM, Steve Vinoski wrote:
> I have a patch ready that adds a --umask option to the yaws startup
> script, but I'd like to wait until Klacke offers his opinion that it's
> the right way to go before I push it to github.
>
That is indeed exactly the right way to go about it.
/klacke
------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlyaws-list
Post received from mailinglist |
|
|
| Back to top |
|
| Guest |
Posted: Tue Aug 03, 2010 5:17 am |
|
|
|
Guest
|
On Tue, Aug 3, 2010 at 1:01 AM, Claes Wikstrom <klacke@tail-f.com> wrote:
> On 08/03/2010 05:32 AM, Steve Vinoski wrote:
>
>> I have a patch ready that adds a --umask option to the yaws startup
>> script, but I'd like to wait until Klacke offers his opinion that it's
>> the right way to go before I push it to github.
>>
>
> That is indeed exactly the right way to go about it.
Great, I pushed the changes up.
--steve
------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlyaws-list
Post received from mailinglist |
|
|
| Back to top |
|
|
|
All times are GMT
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|
|