your php application should change permissions.
However you can try using webmins filemanager and select the upload directory. then set your permissions for it (under info) and click “files inherit values” or however it’s called exactly…this might do the trick as well.
you might want to set ownership on that folder first, if not preferred then create a folder in it and set ownership on that one.
And I have java installed and I use it on other sites, so I wonder why it is not detecting that properly now.
Are you sure?
In Firefox, you can check to see whether you have it by looking in the plugins page. Type “about:plugins” into the URL bar, and hit enter. I don’t know how to do this in any other browser.
But, it seems to work with pretty much any of the official Sun Java plugins I’ve tried over the past several years. (It tries to work with the GNU Java plugin, but fails to actually run–the page just goes gray. But, so few of our users use that Java plugin version, it hasn’t been a priority.)
I had to reinstall it because I think I disabled it at some point.
Anyhoo, I found “Files Inherit Group” but that had no effect. I don’t know if this really is a virtualmin thing so much as a linux/apache/php thing, but was hoping virtualmin could make it easy for me.
I just have no clue how to make this one php app upload as a different user.
To reitterate, I do not have access to the php code to modify the owner because the source is encrypted, so I have to do this some other way…
Well, suexec is a tool that has Apache execute code for a given Virtual Server as a given user.
Generally, said user is the Virtual Server owner.
What you might be able to do is create a Virtual Server for this particular application, and simply make sure that the suexec user for Virtual Server is the user you want it uploading files as.
That’d be easiest if that user were the Virtual Server owner, but you can also edit the Apache config and manually add the UID/GID you want it to switch to (but of course, you’ll need to make sure the dir and files associated with it are the same).
-Eric
Ahh, perhaps setting a umask will do what you’re after. It allows you to change the default permissions for a directory and all directories under it for when files are created.
You may need to set the umask in Apache’s init script.
It doesn’t matter where in the init script, just somewhere near the top, and before Apache itself is launched. Then restart Apache and try it again.
-Eric
I once had the permissions changed by setting this through the filemanager, described above. It is odd that it didn’t work for you on your server.
I needed that for a specific folder used by dolphin software which uploaded mediafiles.
Hmmm…I’m not seeing anything about it at the moment. Looks like maybe your application needs to handle setting the file mode, as there doesn’t seem to be a mask setting in php.ini.