Results 1 to 6 of 6

Thread: Make new user with access to 1 folder

  1. #1
    Brigadier General
    Join Date
    Dec 2012
    Posts
    1,012
    Thanks
    440
    Thanked 171 Times in 132 Posts

    Make new user with access to 1 folder

    Hi all,

    How do I create a new user on my vps that can only access only 1 folder and the subfolders? He must be able to edit stuff, upload and download in that folder. folder is inside root/cod2 and then foldername "cry".

  2. #2
    Private First Class YuriJurek's Avatar
    Join Date
    Jun 2013
    Posts
    219
    Thanks
    152
    Thanked 88 Times in 47 Posts
    You need to install some sort of ftp server, try http://www.proftpd.org/ I think it's the best out there for your purpose, also there are lots of tutorials on how to set-up it properly and grant access for one user to certain directory. Let me know if you need any further help.

    Depending on your distro here are a few examples of installation:
    https://www.digitalocean.com/communi...n-ubuntu-12-04
    https://www.digitalocean.com/communi...pd-on-centos-6
    https://www.debian-administration.or...rver_on_Debian
    Last edited by YuriJurek; 1st October 2014 at 13:31.

  3. The Following User Says Thank You to YuriJurek For This Useful Post:

    Ni3ls (1st October 2014)

  4. #3
    Global Mossaderator Mitch's Avatar
    Join Date
    Nov 2012
    Posts
    654
    Thanks
    204
    Thanked 450 Times in 305 Posts
    I use Pure-FTPd and it supports virtual users with only access to their directory.

    http://articlebin.michaelmilette.com...tpd-in-ubuntu/

  5. The Following 2 Users Say Thank You to Mitch For This Useful Post:

    Ni3ls (1st October 2014),YuriJurek (1st October 2014)

  6. #4
    Brigadier General
    Join Date
    Dec 2012
    Posts
    1,012
    Thanks
    440
    Thanked 171 Times in 132 Posts
    Well I still got problems. I dont understand it very good :/ I already got a user called "cry" and the directories root/cod2 contains all the COD2 files that are needed. "cry" would be the fs_game. Even when I do
    Code:
    usermod -d /root/cod2/cry cry
    he can login with sftp, but vps opens in the main screen and not that specific folder

  7. #5
    Assadministrator kung foo man's Avatar
    Join Date
    Jun 2012
    Location
    trailerpark
    Posts
    2,010
    Thanks
    2,102
    Thanked 1,084 Times in 753 Posts
    Just remove the read/write flags, but not the access/x flag from the directories:

    PHP Code:
    chmod 711 /
    chmod 711 /home
    chmod 711 
    /lib32

    chmod 700 
    /root -
    (Possible in WinSCP also ofc)

    I don't know why you put the "home" folders into /root. Normally all users belong into /home.
    Last edited by kung foo man; 1st October 2014 at 17:07. Reason: 1 is x only
    timescale 0.01

  8. #6
    Brigadier General
    Join Date
    Dec 2012
    Posts
    1,012
    Thanks
    440
    Thanked 171 Times in 132 Posts
    I dont get it. They are talking about home/user. But I already got a directory. They need access to that one and only directory and not able to go to higher directories.

Posting Permissions

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