Thenayr
Thenayr

Reputation: 55

NFS write permissions error

I've created an NFS share on one server to another (client) server and successfully mounted the folder (let's say /home/user/public_html/examplefolder) to the second (client) server.

I've logged in to the FTP account on the second (client) server and I'm attempting to write folders/files into the mounted NFS location (/home/user/public_html/examplefolder), but I get a permission denied error.

If I ssh into the client server as root I have full access to write into the NFS mounted location, so I know it has to be a user permission type of error.

I'm running CentOS 5 on both servers.

Upvotes: 2

Views: 3643

Answers (2)

Thenayr
Thenayr

Reputation: 55

I ended up doing a full user and group modification to get the users and groups on the client server to match up with the original server.

Upvotes: 1

sarnold
sarnold

Reputation: 104110

I don't think you're running into the root squash, but I'm having trouble following all the clients and servers in your description, so here's a quick summary of root squash, you can better tell if this is what is happening:

NFS provides a root squash option, to ensure that processes running as root on clients get no special privileges on the server. So the server 'squashes' all client root access to a nobody user on the server. (Which is why programs should never run as as nobody; the user id already has a specific use, and shouldn't be used for several unrelated purposes.)

Another possibility is your FTP server is confined with a tool such as AppArmor, SElinux, TOMOYO, or SMACK. Any of these mandatory access control tools can prevent an application from writing in specific locations, and might not yet be configured for your site. Check dmesg(1) output to see if there are any rejection messages, most or all these tools log to dmesg(1) if auditd(8) isn't running.

And, perhaps your ftp server has been configured to deny writes. Finding out where the Access Denied error message is coming from is important; you can strace -o /tmp/ftp.out -f $(pidof ftpd) (or whatever the process name is) to log all system calls and results to the /tmp/ftp.out file, which will give you an opportunity to see if open(2) calls are being rejected by the operating system or by the program.

Upvotes: 1

Related Questions