The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to access a symlink pointing at a folder in another user's account?

Discussion in 'General Discussion' started by DReade83, Jul 21, 2009.

  1. DReade83

    DReade83 Well-Known Member

    Joined:
    Oct 20, 2006
    Messages:
    196
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Cheshire, UK
    From what I can tell this is a permissions problem, but don't want to be using root to FTP in as the answer.

    I have two accounts on my CentOS 5.3 server:

    user1
    user2

    Logged in as root I have done the following:

    cd /home/user1/www/
    ln -s /home/user2/www/images images
    chown -hR user1.user1 /home/user2/www/images

    ** SymLink created **

    sudo -u user1 ls images/

    Response: "ls: images/: Permission denied"

    I have ensured both ends are set to 777 mode.

    I have created a script using PHP, which is able to run from a domain hosted under the user1 account, upload a file and move the file into the symlink without an issue.

    Any help on this issue highly appreciated. Thanks in advance.
     
  2. Janak

    Janak Well-Known Member

    Joined:
    Jul 18, 2009
    Messages:
    71
    Likes Received:
    1
    Trophy Points:
    6
    Once you do ls -l in /home/user2/www/images are you able to see if symlink was created properly?

    Also, verify the ownership of images folder on user2 and check if its ownership was assigned to user1 or not?
     
  3. DReade83

    DReade83 Well-Known Member

    Joined:
    Oct 20, 2006
    Messages:
    196
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Cheshire, UK
    It's OK, all sorted, turns out I didn't do CHMOD 755 on the user's home folder too. Thanks anyway. :)
     
Loading...

Share This Page