I have web site with user web1:client1 and directory /usr/local/app/uploads/images with owner myuser:myuser. In this web site there is upload form, which must write images to /usr/local/app/uploads/images.
As I prefer to keep all files under websites directory, from application's point of view, I created symlink /usr/local/app/uploads -> /var/www/clients/client1/web1/web/uploads, and make script write to /var/www/clients/client1/web1/web/uploads/images.
If the original dir /usr/local/app/uploads have 777 rights, it works. As I don't want this, I added the user web1 to the group myuser and change rights to 775. But it does not works (no write permissions).
# groups web1
web1 : client1 myuser sshusers
In the script I tried to write file in the original /usr/local/app/uploads/images directory directly, but it does not work either.
In shell, I tired to swith user to web1 and try to write file manually, but when execute "su web1" logged as root, nothing happens - the console continues to show root as logged. If execute "su web1" logged as "myuser", I have prompted for password, which I don't know.