Hello All,
I've written a php script that uploads a file to the IFS using the following function:
move_uploaded_file($_FILES['uploaded']['tmp_name'], $target)
It successfully uploads the file. But, does not inherit the permissions of the folder it is contained under.
I tried setting the upload_tmp_dir to a special folder with the permissions set. This didn't help at all...
Any ideas?
I'm using Zend on the iSeries V5R4M0
Software/Hardware used:
Zend, iSeries, V5R4MO
ASKED:
February 1, 2010 8:28 PM
UPDATED:
March 3, 2010 9:30 PM
What are the permissions on the resulting file ?
Tom Liotta…I’m waiting on your reply for this one. I saw you have an article I can get by paying for joining the experts site. I know you could set up a scheduler job to set authorities to a file by path and name but if you’re date stamping or numbering many incoming files I don’t think this would work without some pretty complicated code and the data might be temporarily unavailabe for other users.
I’ll add a comment, though I can’t say a whole lot about what’s happening.
Note that PHP is a 3rd-party facility with behavior of its own. It’s not technically under any strict obligation to follow how any particular OS does things.
With that said, you might want to review the thread that this comment by Florian resides within. Perhaps it will provide something useful.
I would make sure that both Zend and IBM heard complaints about it.
Tom
Well it looks like the file was getting full permissions for the user who uploaded it and none of the other permissions of the folder.
We have certain permissions we want applied to all files in the folder. We created a Windows .bat script to compensate for it right now. The .bat script successfully applies the permissions using xcopy.
That script will work for now. We were just trying to do it more interactively.