I have a webserver, that also doubles as a file server. While I can mount the file server side using samba and copy files etc with permission being all correct. I would like to also give the ability to use HTTP Uploads (when I am round a mates house for example) that I can logon to the webserver and upload to my home directory.
Now the problem I face is that of course the webserver runs as nobody and thus has no permission to write to the actual home directory or chown the files (for neatness)
I am using the following to command to authenticate into the box, which works well:
smbclient //localhost/$username $password -U$username -c lcd
and I suppose that I could use:
smbclient //localhost/$username $password -U$username -D $dest_dir -c put $filename
It seems pointless to do this when i have access to the local system directly
I don't think there is a way of switching the user that a script runs as tho