0

I want to let my friend access my server so he can host his website. Let's call him Joris.

# useradd joris

note that I'm Debian. So now a /home/joris has been created. This is cool and all. BUT. He can

cd /
cd /etc/
cd /var/www/

He can cd pratically everywhere, maybe not delete but he can see everything, which I don't want him to. Is that normal?

2
  • If you don't change his permissions yes
    – 50-3
    Oct 30, 2013 at 1:42
  • 2
    Chmoding system stuff so that he cannot see it will likely break your system. Instead look at setting up a chroot jail for him: searchitchannel.techtarget.com/feature/…
    – Paul
    Oct 30, 2013 at 1:52

1 Answer 1

1

Why are you creating a new user if you just want your friend to be able to host a webpage? For that, all you need is to give him FTP access.

You will want to set up an FTP server, create an FTP user called joris and then let him upload his files which will then be served by your HTTP server. You can then make sure that joris can only access the folders you allow him to but that is easy with FTP. You just need to configure your HTTP server so that it serves the directory where joris will be uploading his stuff. There is absolutely no reason to create a regular Unix user for him.

As for whether it is normal, yes it is. Unix and Linux permissions are usually all about write access. In most cases, allowing people to read is not a problem, the security risk is allowing people to write or delete.

1
  • And, BTW, you can always remove his read access to sensistive files by changing their pemissions to, for instance, 700: chmod 700 fine_with_my_secrets. Same thing for whole folders. Oct 30, 2013 at 7:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .