Page 1 of 1

[solved] owner and permissions become "unknown"?

Posted: Thu Apr 20, 2017 6:28 pm
by pastic
I was playing in a virtual machine, changing permissions for wordpress folders/files copied to /var/www/html, when I ran into a new experience:

    I am in a terminal at /var/www/html and I launch commands at /var/www/html/dev
    Octal permissions for subfolders are 775, and for files 664, when I begin.
    I do sudo chmod -R 755 dev and all subfolders/files become 755
    Then, to revert, I do sudo chmod -R 664 dev and now all permissions/group/owner/datemodified become "unknown".

Is 664 not a valid permission? But files were 664 prior to my commands?
Since I am in a virtual machine I can just go back to a previous snapshot, so I don't need help per se, but I would like to understand what is going on.

Re: owner and permissions become "unknown"?

Posted: Thu Apr 20, 2017 10:54 pm
by WharfRat
If you change a folder's mode bits to 664 then it means that it is read/write for the owner/group and read only for others, but you can't enter it.

Without the executable bit set on a folder access to that folder is denied.

Code: Select all

bill@XPS] ~ $ sudo chmod 664 junk
[bill@XPS] ~ $ cd junk/
bash: cd: junk/: Permission denied
[bill@XPS] ~ $

Code: Select all

[bill@XPS] ~ $ sudo chmod 764 junk
[bill@XPS] ~ $ cd junk/
[bill@XPS] ~/junk $


Setting the mode to 764 it will then be read/write/executable for the owner i.e., you'll be able to cd to it :wink:

Re: owner and permissions become "unknown"?

Posted: Fri Apr 21, 2017 3:29 am
by pastic
I see. Thanks!