Koozali.org: home of the SME Server

Obsolete Releases => SME Server 7.x => Topic started by: aussielids on February 24, 2009, 04:17:13 PM

Title: Changing ownership of user files
Post by: aussielids on February 24, 2009, 04:17:13 PM
Hi Guys, I was previously running ver 6.0.1, and decided to upgrade to 7.4 (finally). Previously I had two disks in RAID configuration, so I disconnected one of the drives, and then did a fresh install of 7.4 on the remaining drive. I then mounted the non upgraded drive with my files on it and copied them across. This is where I got stuck as I kept getting access denied when accessing the files from my windows PC. Using the "chown -Rv user:group *" command should have worked, but it didn't. But when I used midnight commander it was able to change the permissions successfully using the same user and group, but only on the directories and not the files. After a while I was able to work out that if I used "chown -Rv 644:group *" that the windows machine could read and write all the files and directories. I clearly have missed something, but don't know what. Could someone please help with what the command should have been? I was logged in as root.
Thanks
Dave
Title: Re: Changing ownership of user files
Post by: David Harper on February 24, 2009, 04:28:22 PM
Welcome to the forums :)

What does ls -l show for the affected files?
Title: Re: Changing ownership of user files
Post by: cactus on February 24, 2009, 06:49:55 PM
Wouldn't a disconnect-upgrade-resync track have been easier? Or a restore from backup? I am not sure if the uids of users/groups are the same now compared to your SME 6 server. If you would have used one of the two suggestions SME Server would have handled this transparently for you AFAIK.

If you are to go that route keep in mind to remove all contribs before going that way.
Title: Re: Changing ownership of user files
Post by: aussielids on February 24, 2009, 11:44:21 PM
On the original 6.0.1 disk ls -l shows the user and group as olduser:oldgroup (they're the same??). When I copy the files they retain the same user:group (as expected). I then chown to the new username:newgroup, I can only read the directory, not the files. The username and groupname weren't the same.

I did the upgrade this way because I had quite a few contribs installed because I wanted to try them out, and to uninstall them would have taken more time (so I thought). Plus a fresh install was appealing.

Update: I just ran the command with "chown -Rv username:username *" and this works. I can read the directories and files in the windows pc. Now I'm confused, does SME allocate the same username to the group name for a reason? Would someone be kind enough to explain this a little? Or better still point me to where I can read how it works? Thanks.