Detect the minimum permissions PHP needs to write to a directory: 0777, 0770 or 0700? -


Some scripts & amp; Generally, folder permissions were incorrect and its folders were uploaded with FTP and the script should notify which permissions to set. Of course, it is not good to set 0777 which I am going to write. But there are 3 possible webserver configurations:

  1. PHP user = user FTP, need writing 0700
  2. The user is different, but it is related to the same group. It is 0770
  3. does not run from PHP or there is no normal GID: this is 0777

What to find out The way that octets allow enough scripts to work for?

The PCNTL extension is not welcome because it lacks in some configurations.


Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -