Search code examples
phpapacherights

Apache PHP - default upload file rights


I want the uploaded file rights set to rw-r--r-- by default but there are rw-r----- (read rights for others is missing...) .

  1. The files upload via php. all umask already set to 022.

    root 0022 diradmin mysql majordomo webapps dovecot admin 0022 fw 0022

  2. the base directory rights is 777

    [root@server1 library]# getfacl images file: images owner: fw group: fw user::rwx group::rwx other::rwx

  3. touch command get me what i want (rw-r--r--).

but when upload file through website (php) the file rights was set to rw-r-----. I need read rights for other.

I struggled for this issue for a few days. I'm not sure whether directadmin involve to this issue. Anyone please suggest.


Solution

  • Maybe you can use chmod when you move the files after the upload to change all right

    the doc here