Page 1 of 3 123 LastLast
Results 1 to 10 of 23

Thread: Permissions Do Not Propagate In Gnome & KDE

  1. #1
    Join Date
    Aug 2009
    Beans
    227

    Permissions Do Not Propagate In Gnome & KDE

    I did a fresh 64bit 12.04 install. I put both Gnome & KDE on it.

    I copied files from my NTFS hdd to the newly created /home directory. The folders & files copied fine. Unfortunately, the permissions & ownership did not.

    I assumed NTFS doesn't store / read / recognize Linux permissions & ownership. To fix this, I entered my account's /home directory and reset the permissions & ownership. Very strangely, the permissions & ownership did not fully propagate.

    In both Gnome & KDE, I could not make the top directory's permissions & ownership fully propagate downward to include all existing folders and files. Specifically, I could get folder permissions and ownership to change but not file permissions and ownerships.

    I ran into this problem before and had to use both chmod and chown.

    http://ubuntuforums.org/showthread.p...=cat2005+chmod

    I HATE using those because it is so easy to hose your entire system. It is enough to make me return to Windows.

    Is my only hope using chmod or chown?
    I am a casual linux user who simply wants a Windows replacement. I have little computer knowledge so speak to me as if I were an easily confused child. Thank you.

  2. #2
    Join Date
    Sep 2007
    Location
    England / U.S.
    Beans
    277
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Re: Permissions Do Not Propagate In Gnome & KDE

    I've always used
    Code:
    sudo chown -R group:user /path/to/directory
    Always seems to work for me.

    No, not your only choice. Another would be to use nautilus with root permissions and go through every folder and file one at a time. There may be others. I find terminal commands easier though.
    Linux is not windows // Ubuntu (Quantal:12.10) Guide
    Use descriptive thread titles // Linux... is... not... windows // OSX... is... not... Linux

  3. #3
    Join Date
    Sep 2007
    Location
    Oklahoma, USA
    Beans
    2,378
    Distro
    Xubuntu 16.04 Xenial Xerus

    Re: Permissions Do Not Propagate In Gnome & KDE

    Quote Originally Posted by cat2005 View Post
    I copied files from my NTFS hdd to the newly created /home directory.
    The "/home" directory is not your home directory, and normally requires root permission in order to write anything to it. It's the system-wide container for all users' home directories; if your user name on your system is cat2005, your home directory would be /home/cat2005.

    Normally when you copy anything into your own home directory, both its owner and its group membership will automatically be set to those of your account. The owner's permissions will be read-write, plus execute for directories only, and both group and other permissions will be read-only. All of this is automatic and has nothing at all to do with inheritance from any higher directory. As a general rule, inheritance seldom if ever happens in Linux.

    In addition to all this, Linux has no knowledge at all of NTFS permissions; the Linux permissions for files on NTFS filesystems are established when the filesystem is mounted, and in recent distributions often default to read-only across the board. However, the "mount" command can be used to specify ownership and permissions, and to change them (for the entire filesystem, not for individual bits and pieces that it contains). It's used from the command line and usually requires root permission to execute. You shouldn't have much need for it, though, since copying from such a system won't inherit the original permissions. Instead, the automatic assignment will take place.

    I hope this helps a bit. Permissions happen to be one of the (thankfully, few) areas in which almost nothing you know about Windows is of much use in Linux, and serves only to confuse the issues.
    --
    Jim Kyle in Oklahoma, USA
    Linux Counter #259718
    Howto mark thread: https://wiki.ubuntu.com/UnansweredPo.../SolvedThreads

  4. #4
    Join Date
    Aug 2009
    Beans
    227

    Re: Ownership & Permissions Do Not Propagate In Gnome & KDE

    Sorry, I should clarify. It is both ownership and permissions with which I am having trouble, but more ownership than permissions.

    I copied the folders & files from an NTFS drive and placed them into an ext3 drive used for /home. The folders & files went directly into my account-specific home directory. For example, assume cat2005 is the user. I copied the folders & files into /home/cat2005

    After doing so, linux showed root as the default owner of all folders & files. To fix this, I logged in as root (in both Gnome & KDE) and changed the ownership and permission assignments. I applied the changes to all subfolders and files.

    The folders changed ownership and permission as desired. The files did not change ownership but did change permission.

    Thus, I must somehow change file ownership.

    Any thoughts?
    I am a casual linux user who simply wants a Windows replacement. I have little computer knowledge so speak to me as if I were an easily confused child. Thank you.

  5. #5
    Join Date
    Aug 2009
    Beans
    227

    Re: Permissions Do Not Propagate In Gnome & KDE

    Quote Originally Posted by Mr_JMM View Post
    I've always used
    Code:
    sudo chown -R group:user /path/to/directory
    Always seems to work for me.

    No, not your only choice. Another would be to use nautilus with root permissions and go through every folder and file one at a time. There may be others. I find terminal commands easier though.
    Yes, I thought about using nautilus but I have hundreds of folders & files. If I use sudo chown, then will that change the ownership for both the folders and files? Sorry, it has been so long since I last performed this task that I can't remember.
    I am a casual linux user who simply wants a Windows replacement. I have little computer knowledge so speak to me as if I were an easily confused child. Thank you.

  6. #6
    Join Date
    Sep 2007
    Location
    Oklahoma, USA
    Beans
    2,378
    Distro
    Xubuntu 16.04 Xenial Xerus

    Re: Ownership & Permissions Do Not Propagate In Gnome & KDE

    Specifically, what command did you use to apply the changes to all subfolders and files? The command "sudo chown -R user:group ./*" should have done it for changing ownership and group membership, while "chmod -R perm ./*" where perm=the desired permission should have done it for the permissions if you had already changed ownership to your own user name. Doing such recursive modifications with a wildcard file name is extremely dangerous if done outside your own home directory (and usually makes a system unusable), but within the home directory all data is supposed to be owned by you so it should be safe enough.

    Note that the sequence is "user:group" rather than the reverse as given in another post. SInce they are the same, usually, it's an easy mistake to make.

    Note also that I left the "sudo" out of the second command; that's added insurance to make sure that any file you do not own (even though there ought not be any such) doesn't get its permissions modified.

    Once you get the existing files straightened out to your satisfaction, you can set up an entry in /etc/fstab to mount the NTFS drive with your desired owner:group values and permissions, so you don't have to go through this again. If you'd like to do so we can tell you how...
    --
    Jim Kyle in Oklahoma, USA
    Linux Counter #259718
    Howto mark thread: https://wiki.ubuntu.com/UnansweredPo.../SolvedThreads

  7. #7
    Join Date
    Aug 2009
    Beans
    227

    Re: Permissions Do Not Propagate In Gnome & KDE

    Jim,

    I haven't yet run the -R command line instruction.

    Instead, using Gnome & KDE, I just clicked "properties" and tried to apply the ownership and permission changes that way. It worked on folders but not on files.

    My hope is to find some non-command line method to apply the changes to all folders, subfolders, files, etc at once, assuming there is an option. I am a command line clutz and am wary of using it unless I have no choice.

    Question

    1) If I did the -R command, then is this the correct syntax (words, spacing, etc):

    sudo chown -R user:group /path/to/directory

    where user = my account's user ID
    where group = whatever group I want to be the default group

    Thank you again.
    I am a casual linux user who simply wants a Windows replacement. I have little computer knowledge so speak to me as if I were an easily confused child. Thank you.

  8. #8
    Join Date
    Sep 2007
    Location
    Oklahoma, USA
    Beans
    2,378
    Distro
    Xubuntu 16.04 Xenial Xerus

    Re: Permissions Do Not Propagate In Gnome & KDE

    Quote Originally Posted by cat2005 View Post
    Question

    1) If I did the -R command, then is this the correct syntax (words, spacing, etc):

    sudo chown -R user:group /path/to/directory

    where user = my account's user ID
    where group = whatever group I want to be the default group
    Yes, that's correct.

    The command line is usually the simplest way to handle such repetitive tasks, but you're quite correct to view it with suspicion. Any time someone gives you a command to run, be sure to ask for an explanation of what it does. This will give you more confidence in its use as you learn more of the details.

    Here, specifically, is what that command does: "sudo" switches to the super user's powers for the duration of the command that follows, and leaves them available for 15 minutes afterward (although you can change the timeout period if that makes you uncomfortable). "chown" is the command to change ownership and group membership of files and directories. "-R" is one of many options to the command, and makes it run recursively on not only the named file/directory but on all others below the named one in the tree. Finally comes the path to the topmost directory you want the command to act upon.

    What makes the "-R" option dangerous is that it acts blindly, with no regard for existing ownership or permissions. When the specified area is limited and you are confident there will be no conflicts, it's perfectly safe. However it should never be used on system directories or, even worse, the entire file system. Many critical capabilities, including "sudo" itself, require specific combinations of ownership and permissions, and quit working entirely if those are changed.
    --
    Jim Kyle in Oklahoma, USA
    Linux Counter #259718
    Howto mark thread: https://wiki.ubuntu.com/UnansweredPo.../SolvedThreads

  9. #9
    Join Date
    Aug 2009
    Beans
    227

    Re: Permissions Do Not Propagate In Gnome & KDE

    Jim,

    I did the -R command and it worked. However, I got a strange message. Below is my terminal text.

    catprime@lincpu:~$ sudo chown -R catprime:catprime /home/catprime
    [sudo] password for catprime:
    chown: cannot access `/home/catprime/.gvfs': Permission denied
    catprime@lincpu:~$



    I couldn't find a ".gvfs" file even when I made all files visible. Now if I try to change any ownership or permission settings the normal way (i.e., not via -R) and apply to all folders, subfolders and files, I get this strange message:

    Setting ACL for /home/catprime/.gvfs

    Any thoughts?
    I am a casual linux user who simply wants a Windows replacement. I have little computer knowledge so speak to me as if I were an easily confused child. Thank you.

  10. #10
    Join Date
    Sep 2007
    Location
    Oklahoma, USA
    Beans
    2,378
    Distro
    Xubuntu 16.04 Xenial Xerus

    Re: Permissions Do Not Propagate In Gnome & KDE

    It's a known bug, but launchpad doesn't show it as having much priority. The ".gvfs" subdirectory in your home directory provides mount points for devices you mount by the "gigolo" program and possibly "samba" also, and is supposed to have permission for only its owner -- which should be you. The bug is that the super user is not allowed access to it, which should never happen. This probably is what causes the message when you try to change permissions from the GUI recursively, since the GUI must use root permissions behind the scenes to do so.

    Since it's not something that you use explicitly, and which the system uses only under certain conditions, best just ignore the error. You should be able to see the directory using the command "ls -la $HOME |grep gvfs" which tells the list (ls) command to list all directories within your home directory in long format then filter out all except .gvfs; don't use "sudo" with the command and it should give you the ".gvfs" entry with permissions of "drwx------" with owner and group both yours.
    Last edited by JKyleOKC; November 25th, 2012 at 05:02 AM.
    --
    Jim Kyle in Oklahoma, USA
    Linux Counter #259718
    Howto mark thread: https://wiki.ubuntu.com/UnansweredPo.../SolvedThreads

Page 1 of 3 123 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •