I have a program which creates some log directories using root next to the directory the user has given as argument to the script. I later chown them to my webservers user.
The problem is if all these are on an external drive then the directories do get created but the webservers user cannot write to them i.e files inside them. I guess this is mostly because the directory /media/<my-user> does not have execute permission for other users . External drive automounts at /media/<my_user>/external-drive.
I can mount with correct permissions via fstab or open nautilus using sudo and then change permissions but maybe there is a better solution. My applications end users are not experienced with ubuntu/linux.
I also tried adding the webservers user to plugdev but that didnt do the trick.