FTP to a 'nobody' owned directory?

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
User avatar
seodevhead
Forum Regular
Posts: 705
Joined: Sat Oct 08, 2005 8:18 pm
Location: Windermere, FL

FTP to a 'nobody' owned directory?

Post by seodevhead »

Hey guys... I created a directory on my website to allow a php application to create subdirectories and write files to. It all works fine and dandy with permissions set to 755, but now I want to upload to this directory a whole bunch of php files I created (another web application) and I also need to upload some other image folders and what not.

But since 'nobody' (or PHP) owns the directory, my FTP program (Smart FTP & WS_FTP) is telling me I cannot upload or fool with this particular directory - doesn't have permission.

What am I to do? How do I go about uploading my other php and image files to this directory now? Is there some kind of workaround? I really appreciate any help on this matter. Thanks so much.
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Post by Christopher »

First of all I would recommend using only SSH and SFTP (on Windoz use Putty and WinSCP).

Find out what group the "nobody" user is in (often "noone" or "web") and create a shell account that is also in that group. Then if you set the permissions to 775 both users should be able to write to that directory. Use that specific user (SFTP) just for that purpose. You only ever want to assign the minimum privileges to a user
(#10850)
User avatar
seodevhead
Forum Regular
Posts: 705
Joined: Sat Oct 08, 2005 8:18 pm
Location: Windermere, FL

Post by seodevhead »

Hey arborint... Thanks for the response. I am not sure if I understand what you mean by "use SSH or PuTTy". I am on a windows machine, but rarely use putty/ssh to do anything (actually all I know how to do is use chown to change ownership of a folder).... but you are saying I can upload files using putty? I have never heard of SFTP.
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Post by Christopher »

You can use a free program called WinSCP that works just like your FTP client (maybe better) but does everything over SSH (it uses the Putty libraries I believe). You use it with a shell account rather than a FTP account -- that's the only difference.

PS - if you use the Eclipse IDE you can use the ESFTP plugin to do SFTP from within each project.
(#10850)
User avatar
seodevhead
Forum Regular
Posts: 705
Joined: Sat Oct 08, 2005 8:18 pm
Location: Windermere, FL

Post by seodevhead »

Thanks so much arborint... I'll try to get it working with those.

Is there anyway I can assign both my standard apache user to the directory alongside 'nobody'... so I can both use php as owner and apache? I am under the impression that you can only have one owner.. is that correct?
Post Reply