Find the answer to your Linux question:
Results 1 to 3 of 3
Hey I am new to using linux and also SSh and I was wondering if you guys can give me a hand. I have noticed that everytime I upload a ...
  1. #1
    Just Joined!
    Join Date
    Aug 2007
    Posts
    2

    SSH, unzipping, file permissions

    Hey I am new to using linux and also SSh and I was wondering if you guys can give me a hand. I have noticed that everytime I upload a zip file via FTP then login to my server via root and unzip it I can't change the permissions via the ftp anymore, I always have to do so from the shell. Is this because I logged in as root and i'm using a different ftp user or some other reason I am overlooking? Any help would be great, thanks.

  2. #2
    Linux Enthusiast
    Join Date
    Apr 2004
    Location
    UK
    Posts
    658
    Is this because I logged in as root and i'm using a different ftp user
    Short answer: Yes.

    Long Answer: You can only change the permissions on files you own. Zip files don't store ownership information so when you unzipped as root the ownership probably defaulted to root. When you FTP in as another user you aren't allowed to change permissions.

    Code:
    chown <ftp user> <filename>
    Run the above as root and change the bits in <> to change ownership and it should sort you out.

    Let us know how you get on,

    Chris...
    To be good, you must first be bad. "Newbie" is a rank, not a slight.

  3. #3
    Just Joined!
    Join Date
    Aug 2007
    Posts
    2
    Quote Originally Posted by kakariko81280 View Post
    Short answer: Yes.

    Long Answer: You can only change the permissions on files you own. Zip files don't store ownership information so when you unzipped as root the ownership probably defaulted to root. When you FTP in as another user you aren't allowed to change permissions.

    Code:
    chown <ftp user> <filename>
    Run the above as root and change the bits in <> to change ownership and it should sort you out.

    Let us know how you get on,

    Chris...

    Thanks for the response, I don't have a need to do this right now but I will try it out when I do.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...