Have a user only have complete access to one folder
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.
Have a user only have complete access to one folder
Hello
I made a new user (command line) and I just want him to be able to access (read and write) ONE folder (and its contents, which include other folders and other files). I made him via command line (he really has nothing; I had to even make manually (mkdir) his "home").
The folder in question, BTW, is owned (from what I see) root and belongs to the group root. For obvious reasons, this cannot be changed.
I made a new user (command line) and I just want him to be able to access (read and write) ONE folder (and its contents, which include other folders and other files). I made him via command line (he really has nothing; I had to even make manually (mkdir) his "home").
The folder in question, BTW, is owned (from what I see) root and belongs to the group root. For obvious reasons, this cannot be changed.
...
Wouldnt chown change the owner of the folder? The owner is "root" so Im not sure if this is a good idea :S
Yes, it would.
But could you please explain in more detail what you want to achieve? Normally when a user needs full access to a folder, it would be one possibility to make him the owner of the folder. But it depends on the situation.
But could you please explain in more detail what you want to achieve? Normally when a user needs full access to a folder, it would be one possibility to make him the owner of the folder. But it depends on the situation.
Markus
Using php (via ftp) I want to transfer a file from one location to another. The user will be this one and he should only have access a root owned folder (lets say its /dev). Obviously the folder's owner has to stay being root but I want this user to be able to access it to read and write to it.
Couldn't you simply configure FTP in a way that the user "as he is" has access via FTP?
I use FTP to connect from my Smartphone to my Laptop in order to transfer pictures to the laptop and other files to the Smartphone. I have vsftp configured so, that I as a normal user can access the laptop via FTP. The folder, from where I download the files to the Smartphone is in my home-directory of the laptop.
Couldn't you simply configure FTP in a way that the user "as he is" has access via FTP?
I use FTP to connect from my Smartphone to my Laptop in order to transfer pictures to the laptop and other files to the Smartphone. I have vsftp configured so, that I as a normal user can access the laptop via FTP. The folder, from where I download the files to the Smartphone is in my home-directory of the laptop.
Markus
With "write-enable" I believe I can do what you are telling me but it doesnt allow me to chroot so then the user cannot go to other folders. Obviously its automatic thru php but just in case....
With "write-enable" I believe I can do what you are telling me but it doesnt allow me to chroot so then the user cannot go to other folders. Obviously its automatic thru php but just in case....
mh, I think I can't help here. Couldn't you explain in more detail what you're doing? I mean I'm very happy without any knowledge of PHP and "FTP and chrooting" sounds peculiar to me..... I cannot imagine what you want to do.... copying a file to another computer will also work with rsync or scp, chrooting works with ssh.
mh, I think I can't help here. Couldn't you explain in more detail what you're doing? I mean I'm very happy without any knowledge of PHP and "FTP and chrooting" sounds peculiar to me..... I cannot imagine what you want to do.... copying a file to another computer will also work with rsync or scp, chrooting works with ssh.
Markus
I want to connect via FTP to /dev and allow the user to write/read there, only there. Also any folder under /dev
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.