Re:Umask setting is ignored by npm for some directories
by mst on Wednesday October 26, 2016 @12:52PM
(#12798134)
freenode #perl still periodically has to talk somebody trying to get a CGI script running out of using 777 to avoid having to figure out permissions properly.
[ Parent
| on HN ]
Re:Umask setting is ignored by npm for some directories
by rhizome on Wednesday October 26, 2016 @01:05PM
(#12798261)
It's an evergreen topic, I've seen this in so many contexts in almost 20 years in IRC help channels that it's a shibboleth for rookie status in configuring systems. Not only that, but it's a communicable weakness in that it's always passed on from person to person: if you only taught yourself using Google, it's actually hard to find 777 as advice. If you see an SO comment/answer recommending 777, it's invariably downvoted into oblivion.
This increased when devops came on the scene, and it was probably one of the first things that made me conclude that devops was about pushing sysadmin skills on unprepared developers. /rant
Re:Umask setting is ignored by npm for some directories
by kuschku on Wednesday October 26, 2016 @03:20PM
(#12799562)
It’s also an interesting task: How do you configure a folder so that two users, who are in no common groups, can read, write and execute everything? Even if the other user uploaded it with 700 set?
Re:Umask setting is ignored by npm for some directories
by Ded7xSEoPKYNsDd on Wednesday October 26, 2016 @04:06PM
(#12799975)
If there's really no way to run these processes as the same group at least, there's always ACLs:
setfacl -m u:NON-OWNER:rwX,d:u:NON-ONWER:rwX,d:u:OWNER:rwX DIR
(Allows NON-OWNER to read, write, execute if already executable for anyone to that directory, and allows NON-OWNER and OWNER to do the same for newly created files.)
Re:Umask setting is ignored by npm for some directories
by kuschku on Wednesday October 26, 2016 @04:56PM
(#12800467)
I’m not sure that solves the issue of a user (user:user) uploading and creating files via SFTP, but www-data:www-data having to execute, read, and modify them.
Re:Umask setting is ignored by npm for some directories
by Ded7xSEoPKYNsDd on Wednesday October 26, 2016 @05:29PM
(#12800796)
It works pretty well for me, to get Web DAV access to my files on my NAS.
The default ACLs make sure that any newly created files can be accessed by both users.