Hi there,
I experience problems in uploading files to a password protected folder. The protected folder contains only pictures and it's protected from outsiders via direct link but for registered users should be ok to view. I wrote a script that can access the files in there and display them in the browser and the script passes the protection system because it resides on the server. It should work the same with the upload thing, but it doesn't. I use move_uploaded_file. The OS is Linux, the server is Apache 1.3.27 and PHP is 4.3.1
What can I do?
Problems uploading to a password protected folder
Moderator: General Moderators
-
mk_silence
- Forum Newbie
- Posts: 4
- Joined: Sat Jun 21, 2003 5:28 am
- Location: Cluj-Napoca, Romania
- Contact:
does the account the webserver/script runs as have write permission for that directory?
you might use is_writable('nameOfDirectory') to determine this.
http://www.zend.com/manual/function.is-writable.php
you might use is_writable('nameOfDirectory') to determine this.
http://www.zend.com/manual/function.is-writable.php
-
mk_silence
- Forum Newbie
- Posts: 4
- Joined: Sat Jun 21, 2003 5:28 am
- Location: Cluj-Napoca, Romania
- Contact:
-
mk_silence
- Forum Newbie
- Posts: 4
- Joined: Sat Jun 21, 2003 5:28 am
- Location: Cluj-Napoca, Romania
- Contact:
Problem solved - file permissions stuff
I used something like this:
I changed the mod of the protected folder to 777 and same for all the subfolders in it. Since the folder is password protected through apache, I think it's safe. Actualy, I tested it. The upload script is also protected through a session check
I used something like this:
I changed the mod of the protected folder to 777 and same for all the subfolders in it. Since the folder is password protected through apache, I think it's safe. Actualy, I tested it. The upload script is also protected through a session check
-
mk_silence
- Forum Newbie
- Posts: 4
- Joined: Sat Jun 21, 2003 5:28 am
- Location: Cluj-Napoca, Romania
- Contact: