We have created an asset management application web app using
php. This app allows users to browse, upload, rename, replace assets (binary files like images and 3d models)
We developed in windows environment and every thing works fine but when we hosted in linux server (joyent) we are running with permission issues in some scenarios. Below is environment setup
Our public web root folder is located in
home/jill/web/public (webroot) . All assets are located under
home/jill/web/public/assets (assets root) and in sub folders as well
Below are the use cases the way we handling the asset management -
- Bulk upload all assets using ftp program with ftp user (ftpuser)
- Bulk upload all assets using webadmin user (jill), who is owner of
- Upload assets using the web app (default web user is www)
In all above use cases, we also overwrite assets with latest modified files. Now there is a flash application (game) hosted in the webroot which access all those assets and loads in the app.
Now we get permission errors when we try to overwrite/update file using a user id different from which is originally created by a different user.
Example: Try to overwrite a file using web app which was initially uploaded using ftp user and vice-verse
What is the way we can handle this scenario so any file or directory created under webroot\assets by any user can be modified by any user ?
I am a developer not familiar with unix/linux but I think it is something to do with handling groups and group permission but I am not sure how to set ?