BROCKHOVEN Werner (EXT)
2016-01-26 12:16:54 UTC
Hi all,
It seems that when using STOU (sunique on), the uploaded file do not follow the umask setting.
Is this the expacted behaviour?
Is there a configuration that can be done to have STOU also follow the umask setting?
A quick look in the code (modules/mod_xfer.c), shows the following:
/* xfer_post_stou() is a POST_CMD handler that changes the mode of the
* STOU file from 0600, which is what mkstemp() makes it, to 0666,
* the default for files uploaded via STOR. This is to prevent users
* from being surprised.
*/
However while testing with a newly compiled instance, based on https://dl.fedoraproject.org/pub/epel/7/SRPMS/p/proftpd-1.3.5a-2.el7.src.rpm , we notice that uploaded files keep permission 0600. When testing a previous version proftpd-1.3.4d, the behaviour is according to the comment in mod_xfer.c and the resulting uploaded file get permission 0666.
Regards,
Werner Brockhoven
NM CIP MS (22.138)
Email: ***@eurocontrol.int<mailto:***@eurocontrol.int>
Tel CIP MS: 92662
Tel CIP MS: +32 (0)2 730 26 62
EUROCONTROL
96 Rue de la Fusée, 1130 Brussels, Belgium
Follow us on:
Web<http://www.eurocontrol.int/> | Twitter<http://www.twitter.com/eurocontrol> | Facebook<http://www.facebook.com/eurocontrol> | Youtube<http://www.youtube.com/eurocontroltv> | Flickr<http://www.flickr.com/photos/eurocontrol> | Linkedin<http://www.linkedin.com/company/eurocontrol>
____
This message and any files transmitted with it are legally privileged and intended for the sole use of the individual(s) or entity to whom they are addressed. If you are not the intended recipient, please notify the sender by reply and delete the message and any attachments from your system. Any unauthorised use or disclosure of the content of this message is strictly prohibited and may be unlawful.
Nothing in this e-mail message amounts to a contractual or legal commitment on the part of EUROCONTROL, unless it is confirmed by appropriately signed hard copy.
Any views expressed in this message are those of the sender.
It seems that when using STOU (sunique on), the uploaded file do not follow the umask setting.
Is this the expacted behaviour?
Is there a configuration that can be done to have STOU also follow the umask setting?
A quick look in the code (modules/mod_xfer.c), shows the following:
/* xfer_post_stou() is a POST_CMD handler that changes the mode of the
* STOU file from 0600, which is what mkstemp() makes it, to 0666,
* the default for files uploaded via STOR. This is to prevent users
* from being surprised.
*/
However while testing with a newly compiled instance, based on https://dl.fedoraproject.org/pub/epel/7/SRPMS/p/proftpd-1.3.5a-2.el7.src.rpm , we notice that uploaded files keep permission 0600. When testing a previous version proftpd-1.3.4d, the behaviour is according to the comment in mod_xfer.c and the resulting uploaded file get permission 0666.
Regards,
Werner Brockhoven
NM CIP MS (22.138)
Email: ***@eurocontrol.int<mailto:***@eurocontrol.int>
Tel CIP MS: 92662
Tel CIP MS: +32 (0)2 730 26 62
EUROCONTROL
96 Rue de la Fusée, 1130 Brussels, Belgium
Follow us on:
Web<http://www.eurocontrol.int/> | Twitter<http://www.twitter.com/eurocontrol> | Facebook<http://www.facebook.com/eurocontrol> | Youtube<http://www.youtube.com/eurocontroltv> | Flickr<http://www.flickr.com/photos/eurocontrol> | Linkedin<http://www.linkedin.com/company/eurocontrol>
____
This message and any files transmitted with it are legally privileged and intended for the sole use of the individual(s) or entity to whom they are addressed. If you are not the intended recipient, please notify the sender by reply and delete the message and any attachments from your system. Any unauthorised use or disclosure of the content of this message is strictly prohibited and may be unlawful.
Nothing in this e-mail message amounts to a contractual or legal commitment on the part of EUROCONTROL, unless it is confirmed by appropriately signed hard copy.
Any views expressed in this message are those of the sender.