D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] Changing User ID.

 

On 02/05/17 22:48, Julian Hall wrote:
On 02/05/17 21:26, mr meowski wrote:
On 02/05/17 20:31, mr meowski wrote:
Presuming you're on machine Cerce instead the same directory "Word", try
issuing this is in a terminal:

chown -R $USER:$USER Mine
ls -alh Mine
Whoops, typo, not helpful. Should have read:

Presuming you're on machine "Cerce" and in the same directory as before
"Word", try issuing this...

Actual commands remain identical.

Been a long day, sorry Julian.
No worries.. I appreciate the help. I tried those commands as user julian but had a string of 'Operation not permitted' errors, so then I tried them as root, as below:

Cerce Word # chown -R $USER:$USER Mine
Cerce Word # ls -alh Mine
total 40K
drwxrwxrwx 6 root root  4.0K Dec 30  2015 .
drwxrwxrwx 7 1026 users 4.0K May  2 18:04 ..
drwxrwxrwx 2 root root  4.0K Oct 16  2015 Cardassian Galaxy
drwxrwxrwx 2 root root  4.0K Apr 30 18:33 Harp And Dagger
drwxrwxrwx 5 root root  4.0K Jan 19 17:54 Just Ordinary Men
drwxrwxrwx 3 root root  4.0K Apr 22  2016 Misc
-rwxrwxrwx 1 root root   14K May  1  2014 Novel_Idea.doc
Cerce Word # cd Mine/Just\ Ordinary\ Men/Main\ Story/
Cerce Main Story # ls -alh DOC
total 2.7M
drwxrwxrwx 2 root root 4.0K May  2 14:48 .
drwxrwxrwx 5 root root 4.0K Jan 19 17:56 ..
-rwxrwxrwx 1 root root  51K Sep 21  2012 Ordinary Men_ch10.doc
-rwxrwxrwx 1 root root  48K Sep 22  2012 Ordinary Men_ch11.doc
-rwxrwxrwx 1 root root  51K Sep 21  2012 Ordinary Men_ch12.doc
-rwxrwxrwx 1 root root  47K Sep 21  2012 Ordinary Men_ch13.doc
-rwxrwxrwx 1 root root  50K Sep 21  2012 Ordinary Men_ch14.doc
-rwxrwxrwx 1 root root  49K Sep 22  2012 Ordinary Men_ch15.doc
-rwxrwxrwx 1 root root  50K Sep 22  2012 Ordinary Men_ch16.doc
-rwxrwxrwx 1 root root  52K Sep 21  2012 Ordinary Men_ch17.doc
-rwxrwxrwx 1 root root  55K Sep 22  2012 Ordinary Men_ch18.doc
-rwxrwxrwx 1 root root  46K Sep 22  2012 Ordinary Men_ch19.doc
-rwxrwxrwx 1 root root  44K Sep 21  2012 Ordinary Men_ch1.doc
-rwxrwxrwx 1 root root  42K Sep 22  2012 Ordinary Men_ch20.doc
-rwxrwxrwx 1 root root  53K Oct 22  2012 Ordinary Men_ch21.doc
-rwxrwxrwx 1 root root  48K Oct 30  2012 Ordinary Men_ch22.doc
-rwxrwxrwx 1 root root  51K Nov  7  2012 Ordinary Men_ch23.doc
-rwxrwxrwx 1 root root  46K Nov 17  2012 Ordinary Men_ch24.doc
-rwxrwxrwx 1 root root  50K Nov 19  2012 Ordinary Men_ch25.doc
-rwxrwxrwx 1 root root  50K Dec  1  2012 Ordinary Men_ch26.doc
-rwxrwxrwx 1 root root  39K Sep 21  2012 Ordinary Men_ch2.doc
-rwxrwxrwx 1 root root  45K Sep 21  2012 Ordinary Men_ch3.doc
-rwxrwxrwx 1 root root  43K Sep 21  2012 Ordinary Men_ch4.doc
-rwxrwxrwx 1 root root  47K Sep 21  2012 Ordinary Men_ch5.doc
-rwxrwxrwx 1 root root  46K Sep 21  2012 Ordinary Men_ch6.doc
-rwxrwxrwx 1 root root  44K Sep 21  2012 Ordinary Men_ch7.doc
-rwxrwxrwx 1 root root  41K Sep 21  2012 Ordinary Men_ch8.doc
-rwxrwxrwx 1 root root  40K Sep 21  2012 Ordinary Men_ch9.doc
-rwxrwxrwx 1 root root 430K Sep  7  2012 Ordinary Men.doc
-rwxrwxrwx 1 root root  24K Dec 30  2015 Ordinary Men_Epilogue.doc
-rwxrwxrwx 1 root root 923K Feb 17 17:43 Ordinary Men - Longer.doc
-rwxrwxrwx 1 root root  22K Dec 30  2015 Ordinary Men Prologue.doc
Cerce Main Story #

As you can see the folders are quite heavily nested so I went down into one to check the resulting file permissions, which I assume was the point. They're now all owned by root though aren't they?

I have worked only on copies, and this is the output from the /original/ folder with /nothing/ done to the permissions:

Cerce Books # cd Mine/Just\ Ordinary\ Men/Main\ Story/
Cerce Main Story # ls -alh DOC
total 2.7M
drwxr-xr-x 2 julian julian 4.0K May  2 14:48 .
drwxr-xr-x 5 julian julian 4.0K Jan 19 17:56 ..
-rwxrwxrwx 1   1026 users   51K Sep 21  2012 Ordinary Men_ch10.doc
-rwxrwxrwx 1   1026 users   48K Sep 22  2012 Ordinary Men_ch11.doc
-rwxrwxrwx 1   1026 users   51K Sep 21  2012 Ordinary Men_ch12.doc
-rwxrwxrwx 1   1026 users   47K Sep 21  2012 Ordinary Men_ch13.doc
-rwxrwxrwx 1   1026 users   50K Sep 21  2012 Ordinary Men_ch14.doc
-rwxrwxrwx 1   1026 users   49K Sep 22  2012 Ordinary Men_ch15.doc
-rwxrwxrwx 1   1026 users   50K Sep 22  2012 Ordinary Men_ch16.doc
-rwxrwxrwx 1   1026 users   52K Sep 21  2012 Ordinary Men_ch17.doc
-rwxrwxrwx 1   1026 users   55K Sep 22  2012 Ordinary Men_ch18.doc
-rwxrwxrwx 1   1026 users   46K Sep 22  2012 Ordinary Men_ch19.doc
-rwxrwxrwx 1   1026 users   44K Sep 21  2012 Ordinary Men_ch1.doc
-rwxrwxrwx 1   1026 users   42K Sep 22  2012 Ordinary Men_ch20.doc
-rwxrwxrwx 1   1026 users   53K Oct 22  2012 Ordinary Men_ch21.doc
-rwxrwxrwx 1   1026 users   48K Oct 30  2012 Ordinary Men_ch22.doc
-rwxrwxrwx 1   1026 users   51K Nov  7  2012 Ordinary Men_ch23.doc
-rwxrwxrwx 1   1026 users   46K Nov 17  2012 Ordinary Men_ch24.doc
-rwxrwxrwx 1   1026 users   50K Nov 19  2012 Ordinary Men_ch25.doc
-rwxrwxrwx 1   1026 users   50K Dec  1  2012 Ordinary Men_ch26.doc
-rwxrwxrwx 1   1026 users   39K Sep 21  2012 Ordinary Men_ch2.doc
-rwxrwxrwx 1   1026 users   45K Sep 21  2012 Ordinary Men_ch3.doc
-rwxrwxrwx 1   1026 users   43K Sep 21  2012 Ordinary Men_ch4.doc
-rwxrwxrwx 1   1026 users   47K Sep 21  2012 Ordinary Men_ch5.doc
-rwxrwxrwx 1   1026 users   46K Sep 21  2012 Ordinary Men_ch6.doc
-rwxrwxrwx 1   1026 users   44K Sep 21  2012 Ordinary Men_ch7.doc
-rwxrwxrwx 1   1026 users   41K Sep 21  2012 Ordinary Men_ch8.doc
-rwxrwxrwx 1   1026 users   40K Sep 21  2012 Ordinary Men_ch9.doc
-rwxrwxrwx 1   1026 users  430K Sep  7  2012 Ordinary Men.doc
-rwxrwxrwx 1   1026 users   24K Dec 30  2015 Ordinary Men_Epilogue.doc
-rwxrwxrwx 1   1024 users  923K Feb 17 17:43 Ordinary Men - Longer.doc
-rw-r--r-- 1 julian julian  22K Dec 30  2015 Ordinary Men Prologue.doc
Cerce Main Story # ^C


Interesting discovery. A while ago I wrote a review of the first episode of Maigret and saved it on the NAS. These are the current permissions for that file.

-rw-r--r--  1 julian root  16K Mar 29  2016 Maigret.odt

I copied it and saved it on the Desktop of user julian. These are the permissions for the copied file:

-rw-r--r--  1 julian julian  16K Mar 29  2016 Maigret.odt

The one on the NAS won't open with the - now usual - error that it already is. The copy on julian's Desktop opens with no problem. The only difference I can see between the two is that the one on the NAS is in the root group (if I read that right).

Julian

--
The Mailing List for the Devon & Cornwall LUG
https://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/listfaq