1

Topic: How under Windows to deliver the rights to a file under Linux?

I develop a site under Windows, through Git I update on the server on Linux. Locally all works, when I shower on the server files with PHP do not work. It appeared that at them it is right 0664 and that worked it is necessary to put each time 0644. Tell, because of what it and how to correct? On the previous hosting of such problem was not and about the rights of files did not reflect at all. How to make, that to all PHP-files the rights 0644 were put? Strongly do not kick, in Linux not so I understand.

2

Re: How under Windows to deliver the rights to a file under Linux?

Hello, Submitter, you wrote: S> I Develop a site under Windows, through Git I update on the server on Linux. Locally all works, when I shower on the server files with PHP do not work. It appeared that at them it is right 0664 and that worked it is necessary to put each time 0644. Tell, because of what it and how to correct? On the previous hosting of such problem was not and about the rights of files did not reflect at all. Generally should be  generally on the rights, though 777 though 400. The main thing that web server service, the user from which it works, had the right to reading. S> how to make that to all PHP-files the rights 0644 were put? Hang up on crones, once a minute. Or as that differently to fulfill after . #/bin/sh # chown-R apache:apache/var/www/html find/var/www/html-type d-exec chmod 775 {} \; find/var/www/html-type f-exec chmod 644 {} \; exit S> Strongly do not kick, in Linux not so I understand.

3

Re: How under Windows to deliver the rights to a file under Linux?

Hello, Submitter, you wrote: S> I Develop a site under Windows, through Git I update on the server on Linux. Locally all works, when I shower on the server files with PHP do not work. With what exactly you shower? S> It appeared that at them it is right 0664 and that worked it is necessary to put each time 0644. If I correctly understood that shower with an input a shell and a call git pull to read about umask. Normal umask it is equal 022. At you 002 (it CentOS, yes?) It is treated, for example,  commands umask 022 in ~/.bash_profile (or analog for your shell).

4

Re: How under Windows to deliver the rights to a file under Linux?

Hello, Stanislaw K, you wrote: SK>#/bin/sh SK># SK> chown-R apache:apache/var/www/html SK> find/var/www/html-type d-exec chmod 775 {} \; SK> find/var/www/html-type f-exec chmod 644 {} \; SK> exit So it is very bad. It is necessary to narrow down the rights, instead of to expose  wide enough. Perhaps files with 0600 there are necessary to it. Therefore find/var/www/html \(-type d-or-type f \)-exec chmod go-w ' {} ' +, for example. By the way, + in the end instead of a colon - reduction of loading by operation performance. And still it makes sense to add in find check of too wide rights that did not touch the existing. But with umask is all the same easier - checkout will already put as it is necessary.