Need help with permissions of new virtual servers.

2 posts / 0 new
Last post
#1 Sat, 07/17/2010 - 18:24
camsoft

Need help with permissions of new virtual servers.

I have a local Ubuntu development web server and a Mac client which I use to access and edit the files on.

I'm attempting to setup NFS on my Ubuntu server so that I can access the virtual server directories from my OS X client.

I'm having issue with getting the permissions right so that my Mac user can write to a virtual servers' public_html directories.

I've done a bit of reading and it seems you have to match the GUI and UID of the files on the server with that of the logged in user on the Ma to be able to read / write. This kind of make sense and it means that the Unix server thinks I'm the same user as the original owner.

For this to work I think need every virtual server to have the same owner and/or same group otherwise I guess I would have to setup a new user on my Mac client every time I wanted to edit a new site.

When I create a new virtual server in virtualmin it is owned by a new user and group based on the domain name. I therefore can't edit these files on my Mac client because my logged in user does not match.

What I was think was that I could assign all virtual servers to the same owner and group. Then all I have to do is make sure that user's UID and GID matches that of my Mac user.

To be honest I've never really understood unix permissions so it might be getting this completely wrong. But I really need to be able to read/write to ALL the virtual servers via NFS on my Mac client.

Any help would be greatly appreciated.

Mon, 07/19/2010 - 19:46
andreychek

Howdy,

Well, I might offer that a simpler way to solve your issue would be to use root on your mac whenever you're looking to make changes on your remote files.

While even that is considered to be insecure, that's probably better than making it so that your regular user has permission to all the files on your hosting server.

That'll make it harder to accidentally cause any problems, and wouldn't make you jump through hoops with your Virtual Server file ownerships, permissions, and the like.

To do that, you'd just need to make sure you were mounting the NFS partition with the "no_root_squash" option.

Again though, security is a concern here... you'd want to do everything you can to make sure that only your computer has the ability to access your NFS mount, and you need to protect your desktop against unauthorized access so that someone can't inadvertently alter all the files on your web server.

-Eric

Topic locked