Page 1 of 1

Switching Users or Chowning

Posted: Tue Jun 10, 2003 5:00 am
by mchaggis
Hi,

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 :(

sounds simular

Posted: Tue Jun 10, 2003 5:34 am
by devmatch
you have to write a script with move_uploaded_file... like the examples from the forum topic: sorry i don`t know the thread:( search,please...
imo it's the simular problem like fileupload under windows:( do you know a solution for changing permissions like r to rw under unix systems?
cu