LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-21-2011, 01:22 AM   #1
nwpuhlh
LQ Newbie
 
Registered: Apr 2010
Location: hangzhou, china
Distribution: Fedora 13
Posts: 9

Rep: Reputation: 0
how to upload file to the subfolder


hi, could anyone pls tell me why I cannot upload local files to subfolder in my home folder on FTP server?
Say, i wanna upload files to /home/haolh/trial/occ/src/occ, but following error msg were given...

command: put "C:\Proj\trial\occ\src\occ" "occ"
error: /home/haolh/trial/occ/src/occ: open for write: permission denied

After google this prob, i've tried commands as below but it still failed
chmod 770 /home/haolh/
chown root:haolh /home/haolh/
 
Old 03-21-2011, 01:30 AM   #2
ZenKen
LQ Newbie
 
Registered: Mar 2011
Distribution: Personal use: Gentoo or Archlinux, Production environments: CentOS or Debian
Posts: 9

Rep: Reputation: 4
Nwpuhlh,

Taking a quick look at this tells me you're uploading into the /home/haolh/trail/occ/src/ directory, but are only changing permissions for /home/haolh. To recursively change the permissions of a directory (which means include all subdirectories), use the -R (capitalized!) flag with chmod, chown and chgrp.

EDIT: You also might want to use chmod haolh:haolh, because chmod root:haolh makes the folder part of your group, but root owner. While using chmod 770 gives your group (and you thereby) rwx permissions, it's an uncommon way of doing things, especially in your own home directory.

- ZenKen

Last edited by ZenKen; 03-21-2011 at 01:39 AM. Reason: Addition
 
1 members found this post helpful.
Old 03-21-2011, 01:52 AM   #3
nwpuhlh
LQ Newbie
 
Registered: Apr 2010
Location: hangzhou, china
Distribution: Fedora 13
Posts: 9

Original Poster
Rep: Reputation: 0
Yeah, it works after "-R" is added to each command! Thanks ZenKen for your quick reply!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Upload file to ftp server -vsftp- but can not delete or change the file once uploaded murattas6 Linux - Server 2 06-26-2009 06:00 AM
chown more then one file and subfolder almost000 Linux - Newbie 3 06-15-2007 05:42 PM
web server (fedora core 5) became read-only file system after i upload a file nggs8411 Linux - Server 1 03-26-2007 09:23 AM
importing a bookmarks file into a bookmarks subfolder newbiesforever Linux - Software 0 11-07-2006 09:54 PM
how to run a script on subfolder file in a folder saggi_sam Linux - Newbie 5 07-13-2005 05:04 AM


All times are GMT -5. The time now is 12:51 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration