Results 1 to 6 of 6
I'm trying to upload a shopping cart program to my website. Because there are so many files, I packed them all in a TAR file (cart.tar). The directory on the ...
- 10-11-2005 #1Linux Newbie
- Join Date
- Apr 2004
- Posts
- 173
Permission problems using SSH
I'm trying to upload a shopping cart program to my website. Because there are so many files, I packed them all in a TAR file (cart.tar). The directory on the server is /public_html/cart/ and the TAR file is located in that directory.
I usewhile in the /public_html/cart/ directory and it extracts all the files and folders as it should. Now, the problem is every file has a CHMOD 600 permissions when they need to be 755 (in the /cart/ directory and all other sub-directories).Code:tar -xvf cart.tar
I've triedandCode:chmod 755 .
, but that only works for the current working directory. In order to get every file to have the 755 permissions, I need to CHMOD 755 every single directory. Is there an attribute of theCode:chmod 755 *.*
command that will extract all files with the 755 permission?Code:tar
- 10-11-2005 #2Linux Newbie
- Join Date
- Apr 2004
- Posts
- 173
With
it extracts all the directories with the 755 permission, but all the files in EVERY directory is 600. I want every directory and every file 775.Code:tar -xvf cart.tar
- 10-11-2005 #3Linux Engineer
- Join Date
- Oct 2004
- Location
- Vancouver
- Posts
- 1,366
have you tried adding the recursive tag, -r, to chmod?
Operating System: GNU Emacs
- 10-11-2005 #4Just Joined!
- Join Date
- May 2005
- Posts
- 52
isnt it -R ????
Originally Posted by genesus
- 10-13-2005 #5Just Joined!
- Join Date
- Nov 2004
- Location
- Iowa
- Posts
- 43
It is -R.
Also try the -p flag to tar.
Code:tar -xvpf cart.tar
Should preserve permissions if they were set correct.
- 10-13-2005 #6Linux Newbie
- Join Date
- Apr 2004
- Posts
- 173
Thanks for the help. I remember doing it before, but I just couldn't figure out. I ended up extracting the files like before, but when I set the permissions, I tried
Thanks for the help.Code:chmod -R 755 .


Reply With Quote
