Creating a Linux user with no specific home directory..
#1

If you don't know the Linux operating system, please don't comment (unless you can link me to something good).

Basically, I have someone developing my community's user control panel and they are currently working out of my website's root directory- meaning they have access to the forum and everything. I would prefer if they didn't have this access so I have been attempting to find a way to restrict their permissions so they can only access the files/folders that they have been "chowned" to. The "owner" has to be apache, but the group can be anything.

Can someone guide me into doing this the correct way?

Obviously for the time being I can create a new directory called "controlpanel" and set that as the user's home directory so they only have access to those files/folders, but it's not really what I wanted to do!
Reply
#2

http://superuser.com/questions/37095...tory-with-sftp

Maybe this? Not sure if you are referring to use straight up access from like putty or something, or VIA FTP. I get what you wanna do but ya trying to think what your trying to block access from.
Reply
#3

Well, what you can do is to create the user which the home directory is the web server folder you want.
And then, you execute chmod command to give / remove rights.

Like, you have 3 folders in the web server directory, called "system", "design", "modules" for example, then you do things like:
Code:
adduser system -d /var/www/html/system
chmod 700 /var/www/html/system
adduser design -d /var/www/html/design
chmod 700 /var/www/html/design
adduser modules -d /var/www/html/modules
chmod 700 /var/www/html/modules
That should do the trick i guess, the unique thing which can appear is the apache "access denied" error, not sure though
And you may chmod the forum / other files, so they don't have access to it.
Instead of that, i don't have any idea to do such thing.
Reply
#4

Y_Less, you're right and I have no objection to them having a home directory. However, it seems that when they have a home directory, they either cannot stray from that directory (meaning if they have chown permissions on other files outside of their directory, they cannot see them), or they have full rights to all of the files/folders in their home directory.

So, the new question is: How do I give them a home directory, but also let them stray from that directory if they have chown permissions on files/folders outside of their home directory..?

And, this is FTP we're talking about. They don't have SSH access or anything.
Reply
#5

I have resolved it apparently.

I set the user's home directory to the root directory of the website and chmoded the folders I didn't want them in to 700. So, now they can't even access them unless they're in the proper group.

Thanks anyways, guys.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)