southbeach
Programmer
I have a process that uses file_put_content() to write to disk - I am ending up with files like
the directory in which I store these files is set to 775, not owned by but by my FTP user - this is so that I can FTP as needed. The group is hence, 775 as permission, intended to give group full rwx permission in the directory.
I tried chmod() within PHP script after file_put_content but permission remain same.
My problem is that these files are temporary repository and need ability to open them (on demand) via browser - when attempting to open them, user gets permission denied or Forbidden message.
What am I missing or what is the proper permission settings to avoid this?
--
SouthBeach
The good thing about not knowing is the opportunity to learn - Yours truly, 2008.
Code:
--w----r-T 1 [URL unfurl="true"]www-data[/URL] [URL unfurl="true"]www-data[/URL] 1941640 Aug 14 12:16 job1149_BOL_b6ab74966c.pdf
--w----r-T 1 [URL unfurl="true"]www-data[/URL] [URL unfurl="true"]www-data[/URL] 1941640 Aug 14 12:14 job1150_BOL_87e880f9c3.pdf
--w----r-T 1 [URL unfurl="true"]www-data[/URL] [URL unfurl="true"]www-data[/URL] 1941642 Aug 14 11:55 job1151_BOL_493c0dbbb2.pdf
I tried chmod() within PHP script after file_put_content but permission remain same.
My problem is that these files are temporary repository and need ability to open them (on demand) via browser - when attempting to open them, user gets permission denied or Forbidden message.
What am I missing or what is the proper permission settings to avoid this?
--
SouthBeach
The good thing about not knowing is the opportunity to learn - Yours truly, 2008.