Thursday, February 28, 2019

Ubuntu root can't give any permissions?



Information about my Ubuntu:



No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.5 LTS
Release: 16.04
Codename: xenial



I have a problem. I can't give any permissions nor change them as a root (sudo su, sudo -i etc). What should I do? How do I find the cause of this? How to fix it?



sudo nano test.sh


Output: Error writing lock file ./.test.sh.swp: Permission denied



Giving an user account its own permissions:




sudo chown -R student121:student121 /home/opilane121/


Output: Tons of Operation not permitted texts



Answer to comments:



1) NFS4 is read-write only



2) Output of mount | grep home:




mount | grep home
10.16.122.2:/data/users/students on /home type nfs4 (rw,relatime,vers=4.0,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,po rt=0,timeo=14,retrans=2,sec=sys,clientaddr=10.16.122.146,local_lock=none,addr= 10.16.122.2)


The NFS-server is probably running with root_squash:




Very often, it is not desirable that the root user on a client machine is also treated as root when accessing files on the NFS server. To this end, uid 0 is normally mapped to a different id: the so-called anonymous or nobody uid. This mode of operation (called 'root squashing') is the default, and can be turned off with no_root_squash.





It basically maps root to a different user with least privileges. This is the default setting on NFS.



Talk with you server administrator, or if you are the server administrator, add option no_root_squash to the /etc/exports on the server.


No comments:

Post a Comment

11.10 - Can't boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...