Amazing the education continues for me
I was thinking like Just18
but let us see in detail.
[gert@localhost ~]$ su
[root@localhost gert]# su -
Now in root@~ or /root and the following quote shows that root has rwx = read,write,execute permission here, root group has only r--=read only permission and 'others' ---=nothing
[root@localhost ~]# ls -l / <--- only want /root
drwxr-x--- 32 root root 4096 Feb 12 12:49 root/
Create a file and check permissions on that, shows that root
has rw-=read,write permission (not executable)
[root@localhost ~]# touch afile.glk
[root@localhost ~]# ls -l a*
-rw-r--r-- 1 root root 0 Feb 12 12:49 afile.glk
As root move the file to to /home/gert/Desktop and check permissions of the Desktop directory, and the finding is:
User 'gert' has rwx to this directory (not a surprise, it is after all 'gert' domaine)
[root@localhost ~]# mv afile.glk /home/gert/Desktop/
[root@localhost ~]# ls -l /home/gert <--- only want to see /Desktop
drwxr--r-- 2 gert gert 4096 Feb 12 12:55 Desktop/
Checking the file permissions, shows that root rw-=read,write (not excutable), the file has been moved and permission not changed. The file management of the Desktop is under control of 'gert' not root but root still controls acces to the file. root group r--=read only and others=r-- read only as well so as user I can read the content.
[root@localhost ~]# ls -l /home/gert/Desktop/afile.glk
-rw-r--r-- 1 root root 0 Feb 12 12:49 /home/gert/Desktop/afile.glk
In root konsole I opened the file on the user-Desktop and added some text, as the keen eyed would note that I created empty files, not quite good enough for this check.
In a user-konsole I opened the file using nano
and edited and then tried to save the content
[gert@localhost ~]$ nano /home/gert/Desktop/afile.glk
[ Error writing /home/gert/Desktop/afile.glk: Permission denied ]
What happens if I use root-Konq to investigate this file now.
The file opens in kwrite as normal and I can edit content but when trying to save following message right at last step.
The document could not be saved, as it was not possible to write to /home/gert/Desktop/afile.glk.
Check that you have write access to this file or that enough disk space is available.
And the user 'gert' can delete this file for example via user-Konq