I have a script that works fine on the host machine. I have client machines that mount an NFS directory, where the script in question tries to touch / chown / chmod a file under the NFS mounted folder structure.
When I try the same script on a client machine, I get "permission denied" error and script fails (I start the script by service .. onestart). The touch command creates a file but the owner is "-2" (see here). Upon further reading on the issue, I found many questions on similar problems but few viable answers.
The user database on host is identical to the user database on client, so user ID and names should not conflict - but they do. If a user logs in on the client machine and executes any of touch, rm, chown, chmod in the folders which he has permission, the commands are executed without any error.
I am hoping the correct nfs_mount option placed in client fstab will correct the error? It could also be an issue of specifying the correct user settings for the user called in the script?
When I try the same script on a client machine, I get "permission denied" error and script fails (I start the script by service .. onestart). The touch command creates a file but the owner is "-2" (see here). Upon further reading on the issue, I found many questions on similar problems but few viable answers.
The user database on host is identical to the user database on client, so user ID and names should not conflict - but they do. If a user logs in on the client machine and executes any of touch, rm, chown, chmod in the folders which he has permission, the commands are executed without any error.
I am hoping the correct nfs_mount option placed in client fstab will correct the error? It could also be an issue of specifying the correct user settings for the user called in the script?