Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question
    
If you don't change his permissions yes –  50-3 Oct 30 '13 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 '13 at 1:52
add comment

1 Answer

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.

share|improve this answer
    
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. –  MariusMatutiae Oct 30 '13 at 7:23
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.