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.
FTP to a 'nobody' owned directory?
Moderator: General Moderators
- seodevhead
- Forum Regular
- Posts: 705
- Joined: Sat Oct 08, 2005 8:18 pm
- Location: Windermere, FL
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
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
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)
- seodevhead
- Forum Regular
- Posts: 705
- Joined: Sat Oct 08, 2005 8:18 pm
- Location: Windermere, FL
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.
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
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.
PS - if you use the Eclipse IDE you can use the ESFTP plugin to do SFTP from within each project.
(#10850)
- seodevhead
- Forum Regular
- Posts: 705
- Joined: Sat Oct 08, 2005 8:18 pm
- Location: Windermere, FL