-
November 28th, 2008, 03:57 AM
#1
Member
PHP : letting Apache modify FTP uploaded files
Hi,
I've been Googling my butt off and still found no satisfactory answer to this, so maybe there's someone here who can help.
I'm on a shared hosting environment and this can't change as it's a client's site.
If I upload a file via FTP then Apache/PHP has no rights to rename, unlink etc. I need to find the right command to make Apache/PHP the owner so I can rename etc and then set ownership back to FTP (otherwise it can't be deleted via an FTP client later on).
Any suggestions as I can't use chown on the shared hosting.
Cheers,
Niggles
Last edited by niggles; November 28th, 2008 at 04:04 AM.
Reason: typo...
-
November 28th, 2008, 05:47 AM
#2
Who's the current owner of the files? As far as I'm aware, FTP has a chown like command (heck, it might even be named chown).
You'll probably have to chown the files to the apache user or group. Is there SSH access to the server, it might be easier to do it that way. Also, it might help if you knew the OS (to determine the user/group name for the apache process). Any way you can find that out through support?
enmand
-
December 1st, 2008, 02:29 AM
#3
Member
There's no SSH access and it has to be an automatic process as the files are uploaded by the client through a Java-based FTP applet. I then need to strip out bad characters from the filenames after they've been uploaded.
The weird thing is that the parent folders (created by Apache) can be deleted along with their FTP-uploaded contents, but the individual files are untouchable - no rename, no unlink, no CHMOD.
It's perplexing and being shared hosting I can't add Apache and FTP to the same group.
Cheers,
Niggles
Similar Threads
-
By FcKgW in forum Other Tutorials Forum
Replies: 0
Last Post: April 6th, 2006, 12:17 PM
-
By gore in forum The Security Tutorials Forum
Replies: 0
Last Post: June 2nd, 2005, 03:05 AM
-
By phishphreek in forum Web Security
Replies: 7
Last Post: March 8th, 2004, 03:33 AM
-
By gore in forum Operating Systems
Replies: 3
Last Post: March 7th, 2004, 08:02 AM
-
By Badassatchu in forum Non-Security Archives
Replies: 1
Last Post: November 23rd, 2001, 11:13 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|