excel - Need all files created in a folder at 644 permission automatically -


in site, generating reports (custom code) in excel format. happens creates excel file @ location , user supposed download there through link.

the problem file being created permission of 600 means user unable download it. there way can have 644 (or higher) permission?

i read can place htaccess file in folder excel file being created. htaccess file ensure file created in folder have read access. don't know write in htaccess file.

many thanks.

you need use acls's set default permissions. system has have feature installed. can use man acl more info.

say have reports directory. set default permissions.

setfacl -d -m g::rwx /reports setfacl -d -m o::rx /reports 

this set permissions on group , other. can verify

getfacl /reports 

you can read more on answer.

https://unix.stackexchange.com/questions/1314/how-to-set-default-file-permissions-for-all-folders-files-in-a-directory

and here

http://www.linuxquestions.org/questions/linux-desktop-74/applying-default-permissions-for-newly-created-files-within-a-specific-folder-605129/


Comments

Popular posts from this blog

node.js - Mongoose: Cast to ObjectId failed for value on newly created object after setting the value -

gradle error "Cannot convert the provided notation to a File or URI" -

python - NameError: name 'subprocess' is not defined -