Permissions & symlink question on gentoo linux

Discussion in 'Site & Server Administration' started by dherald, Jun 17, 2009.

  1. #1
    Question 1.

    What command line is there to make the folder and all of it's files 777?

    Question 2.

    Right now my files are stored let's say in /files

    But there is no more space there and I don't want to change the sites code to store the files somewhere else

    But I just installed a new HDD that is located at /newfiles

    I know there is such a thing as symlink, but I'm not sure how exactly it works.

    What I want is so that the files would SEEM to be uploaded to /files, while in reality they would be uploaded to /newfiles

    You know, so that there would actually be no HDD space used in /files, instead everything would be transferred to and from /newfiles

    Does this make any sense and is it possible?

    Help appreciated, and I might hire the best answerer's as consultants for more gentoo issues.
     
    dherald, Jun 17, 2009 IP
  2. vasyl

    vasyl Peon

    Messages:
    138
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #2
    1. chmod 777 * or chmod -R 777 * for recursive
    2. Better to make dir /files/newfiles and mount hdd to it. Or you need exactly /files without subdir?
     
    vasyl, Jun 17, 2009 IP
  3. gary4gar

    gary4gar Peon

    Messages:
    496
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #3
    1) you want to change permission of all files and subfolder in a directory then use -R option. its for repetitive use.
    
    # chmod 777 -R /foldername
    
    Code (markup):
    2) If you are drive is filled and there is no more space left to store files, files store files in another location. for ease of use you can create a shortcut to that new location.
    
    # ln -s source/path/here write/destination/path/here
    Code (markup):
    more information:
    http://www.simplehelp.net/2009/05/14/how-to-create-a-symlink-in-linux/
     
    gary4gar, Jun 17, 2009 IP
  4. nuttyprofessor

    nuttyprofessor Peon

    Messages:
    27
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    even iam facing some probs like this.....

    ive made a newdirectory : (Say Eg: domain.com/default)

    but when i open it in browser it says some error

    Forbidden
    You don't have permission to access http://domain.com/default/ on this server.

    what do i need to change; to fix the issue......
     
    nuttyprofessor, Jun 18, 2009 IP
  5. dherald

    dherald Active Member

    Messages:
    408
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    55
    #5
    But wait, if I make a symlink from A to B, where are the files stored physically?
     
    dherald, Jun 19, 2009 IP
  6. gary4gar

    gary4gar Peon

    Messages:
    496
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #6
    symlink is nothing bu a simply shortcut. suppose I have a music in my documents folder in windows partition which is mounted on "/media/windows/Documents and Settings/Usename/My Documents\My Music".

    since its a very long path and i frequently need to listen to music. so I would simply place shortcut for the above path(/media/windows/Documents and Settings/Usename/My Documents\My Music" in my /home folder to make my life easier.

    
    ln -s "/media/windows/Documents and Settings/Usename/My Documents/My Music" /home/username/music
    Code (markup):
    now when you will open music folder in your home dir, it would simply point to My Music folder in your windows partiton. its just linking two places, data does not move.


    This example is hypothetical:p
     
    gary4gar, Jun 19, 2009 IP
  7. dherald

    dherald Active Member

    Messages:
    408
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    55
    #7
    Ok gotcha.

    So if my A folder is full

    My B folder is empty and has lots of space

    I can link A to B, move files to B

    And when something is "supposed" to be put or called from/to A, it will actually come from B?

     
    dherald, Jun 19, 2009 IP