Open ragnar76 opened 7 years ago
Yep, need a review ...
Could that be implemented in the setup procedure ? A large scale php chmod with the retrieval of the fileserver username as mentioned above
@extragornax You mean, run the chmod by PHP ?
@remrem yes (Check that and that user perm ) but we'd have to investigate the possible errors and issues with that
@extragornax , I don't think this a good idea. I don't want to modify the user system (this is the user job) and there is some hosting providers who disallow or change the behavior of this kind of php function, so we can't be really sure of the results of doing change on the files owner or permissions by PHP.
That's what I mean in my previous message, it's not safe but it's possible.
Can you take a look on this wiki page and let me know of what you think of it (something to change or add) ?
it's probably a good start to set the right permissions here at github. if i make a fresh clone, a lot of files have 0755 while others have 0644. same with directories. admin has 0777 while themes have 0755.
@remrem little edit, I added clearer markers, the list made it pretty weird
@ragnar76 how can you set file permissions on GH ? I'm pretty sure the clone gathers the inherited permissions instead of the ones you post on GH (if they ever push). Personally when I clone, everything is on 744 permission.
@extragornax hm... dunno but i've found this: https://www.reddit.com/r/git/comments/3icu9d/how_to_change_file_permissions_on_github/
so the easiest way to change the rights before commit. To make it easy, you can use "find"
find . -name '' -type d -exec /bin/chmod -v 0755 {} \; find . -name '' -type f -exec /bin/chmod -v 0644 {} \;
note the "d" and "f" in type which stands for directory and file (obviously)
@ragnar76 Interesting I also found why my files where on 744, I had a script running for another project... So we just need to ask the user to put 777 on the host folder and then just leave the file permissions on everything else
Hi.
I've just made a fresh clone of blogotext. and i ended up with this notice:
Do you think it's a good idea to have all files (and directories) read, write and executable for everyone? Imho, it's better to give 0755 to directories and 0644 to files. Also, the owner should be the one which the fileserver is running. For example www-data on debian or apache|nginx|... on centos.
bye