Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Once I create a new user, I want him to only have access to 1 directory that I will create, I want him/her to have write and read access only.
Running Red Had Enterprise
I know I add a user - useradd and create a password, problem is I don't want this user to see anything else other that the one directory I want him to copy files to.
Last edited by desmondlewissmith; 11-19-2007 at 03:41 PM.
Reason: first was wrong
for i in acc1 acc2 acc3 ... ; do mkdir $i; chown $i $i; chmod go-rwx $i; done
If you have a list of the names in a file it's even easier.
Code:
for i in `cat list` ; do mkdir $i; chown $i $i; chmod go-rwx $i; done
Cheers,
Tink
I messed this up, I went back and modified the question since it was written kinda wierd, now the answer doesn't make sense.. heelllllppppp... please...
I messed this up, I went back and modified the question since it was written kinda wierd, now the answer doesn't make sense.. heelllllppppp... please...
Heh. Strange things happen ;}
as for the new question:
I'm afraid that that request isn't very feasible. You can't trivially
lock users out of the entire file-system; you can stop them from
seeing each others files, though, which still works in the way I
described, just use their actual home directories.
as for the new question:
I'm afraid that that request isn't very feasible. You can't trivially
lock users out of the entire file-system; you can stop them from
seeing each others files, though, which still works in the way I
described, just use their actual home directories.
Not sure how to read the reply you wrote, were the i's variables?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.