For example, I recently caused myself a problem. During the latest install, I established my standard UID of 1500. But I overlooked the usual procedure of creating a new group for myself with a 1500 GID. Instead, I placed myself into the "users" group, which had a GID of 100. The files I thereafter created possessed a 1500:100 stamp.
A couple of weeks following the install I attempted to back-up a diff. I attached a USB HDD I've had for several months, and which was formatted, including its folders, with my typical 1500:1500 ownership. Of course it has been no problem to copy from the 1500:1500 USB to my system. But when I attempted to back-up 1500:100 files from my system to the 1500:1500 USB, "permission denied" write errors were generated. Writing to the USB HDD as root would have overcome this, but wasn't the solution I wanted: "chown"-ing any and all 0:0 files to 1500:1500 seemed to be overlooking a more efficient solution.
After some thought, it seemed best to permanently change the primary group attached to my username on the desktop system. I wanted this to happen in a way that automatically assigned the new GID to all existing files in my home directory. Note that username is "patriot".
solution
- exited X to command line
- logged off - "exit"
- logged in as root
- created group 1500 (# groupadd foo -g 1500)
- moved "patriot" from group 100 into group 1500 (# usermod -g 1500 patriot) Note: give this a few minutes to complete; many file GID's are being updated.
- # nano /etc/group - verified patriot was in desired groups
- rebooted and logged in as user "patriot", per usual.
No comments:
Post a Comment