linux - Allow non-root user rw permission on nfs share -



linux - Allow non-root user rw permission on nfs share -

i have 2 linux machines running. 1 jenkins server , other lamp server (downloaded turnkey linux). need allow jenkins user on jenkins server read/write permission share on lamp server using nfs. using root user on jenkins server works fine, when run through jenkins, permission denied error when trying re-create or delete files lamp server. have tried many things, go on fail. how need configure nfs allow jenkins user on jenkins server read/write/delete nfs share on lamp server?

below current config information:

jenkins: 192.168.100.143 lamp: 192.168.100.145 lamp - /etc/exports /var/www 192.168.100.143(rw,anonuid=33,anongid=33) lamp - /etc/passwd www-data:x:33:33:www-data:/var/www:/bin/sh root@lamp /var/www# ls -la total 32 drwxr-xr-x 6 www-data www-data 4096 oct 4 06:12 . drwxr-xr-x 13 root root 4096 oct 15 2013 .. drwxr-xr-x 2 www-data www-data 4096 oct 15 2013 cgi-bin drwxr-xr-x 2 www-data www-data 4096 oct 15 2013 css drwxr-xr-x 2 www-data www-data 4096 oct 15 2013 images -rwxr-xr-x 1 www-data www-data 2709 oct 15 2013 index.php drwxr-xr-x 2 www-data www-data 4096 oct 15 2013 js -rwxr-xr-x 1 www-data www-data 20 oct 15 2013 phpinfo.php jenkins - mount command: mount -t nfs4 -o rw 192.168.100.145:/var/www /mnt/nfs/lamp jenkins - using root: root@jenkins nfs/lamp# ls -la total 32 drwxr-xr-x 6 www-data www-data 4096 oct 4 01:12 . drwxr-xr-x 3 root root 4096 oct 4 01:17 .. drwxr-xr-x 2 www-data www-data 4096 oct 15 2013 cgi-bin drwxr-xr-x 2 www-data www-data 4096 oct 15 2013 css drwxr-xr-x 2 www-data www-data 4096 oct 15 2013 images -rwxr-xr-x 1 www-data www-data 2709 oct 15 2013 index.php drwxr-xr-x 2 www-data www-data 4096 oct 15 2013 js -rwxr-xr-x 1 www-data www-data 20 oct 15 2013 phpinfo.php root@jenkins idweb-package/workspace# ls -la total 6600 drwxr-xr-x 4 jenkins nogroup 4096 oct 4 01:20 . drwxr-xr-x 4 jenkins nogroup 4096 oct 4 00:34 .. drwxr-xr-x 6 jenkins nogroup 4096 oct 4 00:34 .svn -rw-r--r-- 1 jenkins nogroup 2262 oct 4 00:34 build-package.xml -rw-r--r-- 1 jenkins nogroup 6735944 oct 4 00:34 idweb-package-43.zip drwxr-xr-x 6 jenkins nogroup 4096 oct 4 00:37 src root@jenkins idweb-package/workspace# cp idweb-package-43.zip /mnt/nfs/lamp root@jenkins idweb-package/workspace# sudo -u jenkins cp idweb-package-43.zip /mnt/nfs/lamp/idweb-package-43-2.zip cp: cannot create regular file `/mnt/nfs/lamp/idweb-package-43-2.zip': permission denied

i think, because mounted folder owned www-data on jenkins server. user jenkins@jenkins can not write there. should add together jenkins@jenkins www-data grouping on jenkins server or alter grouping of folder on lamp broaden other users.

linux nfs

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -