Permissions/Ownership all screwed up after new install

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
gumby
Level 3
Level 3
Posts: 154
Joined: Sun Feb 15, 2009 12:57 pm

Permissions/Ownership all screwed up after new install

Post by gumby »

I reinstalled Gloria due to problems I was having. Reinstall went OK, did manual partition so I could keep my data and other partitions and install gloria into same partition it already occupied. Install seemed to go okay, but I couldn't set up the data partitions to boot automatically in home because when I tried to enter a path I was getting error messages to enter a different path and didn't know what to do.

So I decided I would mount the partitions after the install and used instructions Fred gave me earlier this year http://forums.linuxmint.com/viewtopic.p ... 6&start=60 (in March) to get the partitions to mount in home automatically and edit fstab. This succeeded and the data partitions (and Windows partition) now mount in Home when I start up. But when I click on either data partition I get "The folder contents could not be displayed. You do not have the permissions necessary to view the contents of 'Data1'"

So I used this advice from PluralDave that was offered earlier this year in the aforementioned thread:

"...You still have to use the terminal though to set ownership with chown
Code: Select all
sudo chown -R username /home/username/data

and repeat for all other data partitions."

I did this and I still can't access the partitions.

I don't have this problem with the Windows partition, only Data1 and Data2.

Back in March 09 Dave had also said "You might have to then set permissions with chmod -R but you can do it via GUI by right clicking the mount folder icon and choosing the permissions tab."

But when I right click the Data1 mount icon I get "Cannot Unmount Volume. You are not privileged to unmount this volume". No option about permissions.

I am, however, able to read Data1 properties by right clicking on the tab that appears right below the toolbar. (I can do this even though the error window is onscreen) In Basic, it says "Contents: unreadable". In Permissions, it says that the owner is "libuuid", not gumby. For Group is says "root". For others it says nothing. Folder access is greyed out in all fields. At bottom it says "You are not the owner, so you cannot change these permissions."

Could someone offer me a quick command or two that will let me permanently access these partitions that are mounted in Home? Thanks.
gumby
Level 3
Level 3
Posts: 154
Joined: Sun Feb 15, 2009 12:57 pm

Re: Permissions/Ownership all screwed up after new install

Post by gumby »

I should point out that, although I can access the Windows partition, its Permissions seem a bit odd:

"Owner: root
Group: plugdev
Others: None
(Folder access greyed out for all three.)

You are not the owner, so you cannot change these permissions."

I suspect that, when I chose Manual Partitioning, the Install program figured I was an expert who didn't need ownership and permissions set up for him as part of the install process. But it was wrong, I'm still a newbie.

My new install is working much better than the old one. All the problems I had with various programs behaving strangely are gone. I just wish I could access my data.

Also, in previous installs Terminal would call me gumby@saturn. In this install, somehow I was not prompted to enter Saturn, or maybe I was and didn't realize it. Anyway, Terminal now calls me gumby@gumby. If I do a sudo su command, it changes it to gumby gumby

Where did I go wrong? Is there some magic code that will make things all right again?
altair4
Level 20
Level 20
Posts: 10327
Joined: Tue Feb 03, 2009 10:27 am

Re: Permissions/Ownership all screwed up after new install

Post by altair4 »

It's probably best for us to see exactly how your partitions are being mounted. Please post the output of the following:

Open Terminal
Type cat /etc/fstab
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
User avatar
pluraldave
Level 5
Level 5
Posts: 705
Joined: Mon Sep 01, 2008 8:05 am

Re: Permissions/Ownership all screwed up after new install

Post by pluraldave »

Sorry, the chown advice is for ext partitions. We did already go through mounting your ntfs partitions as the owner and permissions for ntfs partitions are set at boot in fstab

Old thread
pluraldave wrote:You need to fix the Data1 line. We can pretty much copy the relevant part of the ntfs mount you already have, eg

Code: Select all

/dev/sda8 /home/gumby/Data1 ntfs defaults,umask=007,gid=46 0 2
Permissions for ntfs are set at boot (with umask and gid or uid). I assume you are (have to be?) in group 46 so will get the appropriate permissions but if not open a terminal and type

Code: Select all

id gumby
This will give you a list of your uid (user id) number (probably 1000) and your gid (group id) numbers. You should then replace gid=46 with uid=<uid number> or gid=<gid number>. I think you can also use uid=gumby instead of the user id number.
You said you needed to replace gid with uid last time.
gumby
Level 3
Level 3
Posts: 154
Joined: Sun Feb 15, 2009 12:57 pm

Re: Permissions/Ownership all screwed up after new install

Post by gumby »

altair4 wrote:It's probably best for us to see exactly how your partitions are being mounted. Please post the output of the following:

Open Terminal
Type cat /etc/fstab
Okay, here it is. Thanks for your help.

gumby@gumby ~ $ cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'vol_id --uuid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# / was on /dev/sda6 during installation
UUID=ba342d90-1b59-467b-8572-e89e8c5de2a7 / ext3 relatime,errors=remount-ro 0 1
# swap was on /dev/sda5 during installation
UUID=52e7132f-6553-46b7-a9ff-b8b760a19a49 none swap sw 0 0
/dev/sda1 /home/gumby/WinXP ntfs defaults,umask=007,gid=46 0 0
/dev/sda8 /home/gumby/Data1 ntfs defaults,umask=007,uid=100 0 2
/dev/sda9 /home/gumby/Data2 ntfs defaults,umask=007,uid=100 0 2
gumby
Level 3
Level 3
Posts: 154
Joined: Sun Feb 15, 2009 12:57 pm

Re: Permissions/Ownership all screwed up after new install

Post by gumby »

Oops. I just noticed that in these lines:

/dev/sda8 /home/gumby/Data1 ntfs defaults,umask=007,uid=100 0 2
/dev/sda9 /home/gumby/Data2 ntfs defaults,umask=007,uid=100 0 2

uid=100 is wrong. It should be 1000. I am sure I entered 1000, so I don't know how it became 100...unless I made a typo. I'll try to change it...

Okay, I changed it to 1000, restarted and now I can access the data partitions. I feel pretty stupid! Thanks for your patience with me.

The only thing I'm concerned about now is that, in permissions, now gumby is listed as owner of the data partitions, but the Group is "root." Is that the way it should be? Folder access is "create and delete files" for both.

Also, Permissions for the WinXP partition are, Owner: root. Group: plugdev. Folder access is greyed out in all categories, and at bottom it still says "you are not the owner, so you can't change these permissions."

Despite this, I can still access the Windows files and folders. But shouldn't the owner be gumby, and the group something different than "plugdev"?

Dave, should I replace the gid=46 line in WinXP with UID=1000? The only reason I didn't do that was because, in my previous install, I had no problems with that partition even though it had the gid=46 line.
User avatar
pluraldave
Level 5
Level 5
Posts: 705
Joined: Mon Sep 01, 2008 8:05 am

Re: Permissions/Ownership all screwed up after new install

Post by pluraldave »

You should already be in group 46. What is it you want to be doing with the XP partition?
Do you want to have full read/write access to the partition?

What you have to remember is that now you're dealing with ntfs partitions owner and permissions are set in fstab. The umask=007 means owner and group have full permissions. As you are in group 46 you can change the files.

If you want to own the partition you can change the gid=46 to uid=1000.
gumby
Level 3
Level 3
Posts: 154
Joined: Sun Feb 15, 2009 12:57 pm

Re: Permissions/Ownership all screwed up after new install

Post by gumby »

Well, why wouldn't I want to own the partition? It's my computer, and i'm the only user.

Thanks. I made that change and now own the xp partition.

The thing is, before I made this change, I know fstab said group 46, but still I had no authority to change the files in that partition according to Permissions. Now I do.

I'm afraid I don't understand the distinctions between owner, group and user, because all three are me, but that's probably ok.

Thanks again, Dave.
gumby
Level 3
Level 3
Posts: 154
Joined: Sun Feb 15, 2009 12:57 pm

Re: Permissions/Ownership all screwed up after new install

Post by gumby »

I just tried to edit the original title of this thread to add "--SOLVED" but couldn't do so because there weren't enough characters left in the permitted title length. Perhaps the length limits should be made a bit more flexible.
syanide
Level 1
Level 1
Posts: 22
Joined: Mon Oct 05, 2009 7:05 am

Re: Permissions/Ownership all screwed up after new install

Post by syanide »

Hello guys. I wonder if one fo you kind guys could help me out please? i'm having trouble with my permissions too. Here is my setup:

blkid in terminal outputs the following:

/dev/sda1: UUID="3C063E83063E3DE8" TYPE="ntfs"
/dev/sda5: UUID="bb26c2ef-0853-412c-8f5e-7aa5ed48a488" TYPE="ext3"
/dev/sda6: TYPE="swap" UUID="e306c3f8-4eb3-476f-ab9b-1e7c8510d000"
/dev/sda7: UUID="0E736E6D63C62C00" TYPE="ntfs" LABEL="Media"

sda1 is Vista;
sda5 is Mint;
sda6 is swap and
sda7 is for my data

Unfortunately, i can't seem to rip anything to my data partition as i don't have the permission to do so.

So, I try to amend this by doing this - 'right-click' the Music folder (in the said partition) and 'open as root', I get the red background. Then I 'right-click' and go to 'properties' and then the 'permissions' tab.

Frustratingly, here, I can change the permission fro 'root' to anything i want from the dropdown list, BUT, no sooner have i chosen another option, it changes back to root. it just seems to default back to the 'root' settings.

now, I have tried your suggestions above and created a mounting folder called "Media" in my /home directory but the rest of the instructions don't seem to do anything.

I'm not sure if this is relevant, but (as i have seen much mention of a folder called fstab) I dont seem to have a fstab folder. attached is the picture of my /etc folder.
Screenshot.png
Any help would be appreciated

Kam
User avatar
pluraldave
Level 5
Level 5
Posts: 705
Joined: Mon Sep 01, 2008 8:05 am

Re: Permissions/Ownership all screwed up after new install

Post by pluraldave »

fstab is not a folder, it is a configuration file in the /etc folder. Scroll down and you will see it.

Post your fstab file here and I can let you know the changes to make to it. Your partition is ntfs so you must set the permissions in fstab, you can't change them via right click.
syanide
Level 1
Level 1
Posts: 22
Joined: Mon Oct 05, 2009 7:05 am

Re: Permissions/Ownership all screwed up after new install

Post by syanide »

hi and thanks. here is the contents of the /fstab file (silly me!!)

(ps - it seems I cant even delete the last line of this as i don't have the permission to do this either! It's clearly one of the attempts by me where I'd forgotten to rename the username after cutting/pasting - again even sillier of me!)

# /etc/fstab: static file system information.
#
# Use 'vol_id --uuid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# / was on /dev/sda5 during installation
UUID=bb26c2ef-0853-412c-8f5e-7aa5ed48a488 / ext3 relatime,errors=remount-ro 0 1
# swap was on /dev/sda6 during installation
UUID=64b010ad-8173-406d-8807-9e59662de06d none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0
/dev/sda7/home/Media ntfs defaults,unmask=007,gid==46 0 0
/dev/sdxx /home/fred/Windows ntfs defaults,umask=007,gid=46 0 0
User avatar
pluraldave
Level 5
Level 5
Posts: 705
Joined: Mon Sep 01, 2008 8:05 am

Re: Permissions/Ownership all screwed up after new install

Post by pluraldave »

You have to open the file as root in order to save any changes. Either right click the folder "background" and select "open as root", then open the fstab file or you can launch it from the terminal with

Code: Select all

gksu gedit /etc/fstab
You should then change the sda7 line to

Code: Select all

/dev/sda7 /home/<username>/Media ntfs defaults,umask=007,uid=1000 0 2
You have to be very careful with where you do or don't put spaces and the exact spelling of the terms. There are several mistakes in the version you posted (eg unmask instead of umask). You also have to replace <username> in my code with whatever your username is. The directory is not /home/Media, it is /home/username/Media (also Media or media? They are not the same in Linux).

Once you have corrected and saved your fstab you can test it by running the following commands.

Code: Select all

sudo umount -a
(ignore the error messages, it will only unmount what it can)

then

Code: Select all

sudo mount -a
User avatar
Fred
Level 10
Level 10
Posts: 3337
Joined: Fri Jan 04, 2008 11:59 am
Location: NC USA

Re: Permissions/Ownership all screwed up after new install

Post by Fred »

You may want to refer to my post in another thread, with links. It may shed a bit more light on auto mounting and file/folder ownership and permissions. It is mostly aimed at ext3/4 however. :-)

http://forums.linuxmint.com/viewtopic.p ... ss#p197520

Fred
Insanity: Doing the same thing over and over and each time expecting a different result.

Democracy is 2 wolves and a lamb voting on the menu. Liberty is an armed lamb protesting the electoral outcome. A Republic negates the need for an armed protest.
syanide
Level 1
Level 1
Posts: 22
Joined: Mon Oct 05, 2009 7:05 am

Re: Permissions/Ownership all screwed up after new install

Post by syanide »

Thanks Fred - i had already read one of your previous posts and it sort of got me onto the right track. But, one thing I can't seem to grasp is the whole 'mount in /home or /media' etc.

I've been used to (in ubuntu) just going into my 'Computer' and double clicking my data partition and then saving whatever I want to into there. Then right clicking and then unmounting when I'm done.

I just don't understand the concept of mounting into a folder. Why do I need to do that? Why can't i just have it so that when my computer boots into Mint, the data partition is ready to access.

Dont get me wrong, I'm not disputing what is being said, I'm just trying to understand that's all. Or is it just a case of if I want to auto-mount, then its got to be into a folder - simple as that?

The next thing, once i'm auto-mounted and booted up, I see the partiton on the desktop and obviously in my 'auto-mount' folder. Am i correct in understanding that these are both just pointing in exactly same place (assuming this is affirmative, I think this is why i'm getting confused - why can't I just have the partiton mounted on the desktop without the reference to the /Media folder)

(-ps, I've just realised potential for confusion - I''ve named my mounting folder Media, but my data partition is also 'labelled' "media". In due course, I thin i'll get rid of the label for the partition.

Thanks guys

Kam
User avatar
Fred
Level 10
Level 10
Posts: 3337
Joined: Fri Jan 04, 2008 11:59 am
Location: NC USA

Re: Permissions/Ownership all screwed up after new install

Post by Fred »

syanide,

I think some of your confusion may be coming from what you are seeing on the screen in whatever GUIs you are using versus what is actually happening behind the scenes to accomplish the desired task.

If you follow the link I give above and read the other references there carefully you will see what the requirements are for auto mounting a partition. This is true regardless of the Linux distro you may be using.

There are a number of GUI file managers and other GUIs that can be used to mount and set up auto mounting. Different distros and versions of those distros may use a variety of different GUIs to accomplish this. Some are pretty good. Some are not so good. But they all attempt to do what I have explained elsewhere. Some may create a mounting folder in one place, others may do it somewhere else. Some my put links to the mounting folder on the desktop or other places, others may not. Whatever they may do, they attempt to put a pretty face on it.

There is nothing wrong with a pretty face. I think they look very nice on a females and puppies. :-) To actually learn how things work, however, it is necessary to look beyond the pretty face. Knowing what button to click in a GUI doesn't help you understand what you are actually doing. It just allows you to memorize a particular GUI. When the GUI changes or isn't available to you anymore you are back to square one, and still don't understand how to get your task done.

As you may have noticed I usually give instructions in the CLI. I do this for reasons other than to confuse and harass you. :-) Listed in no particular order:

1.) It is good to become familiar with the CLI. It is a strong and useful feature in Linux, not a weakness.

2.) The CLI is flexible, precise, and reliable, and can easily do things that are difficult if not impossible in a GUI.

3.) It is impossible for me to know what GUI's you have available to you in your system. And out of the question to expect me to remember how to use all of them from memory well enough to give you step-by-step instructions. The CLI is universal to Linux.

4.) Some GUIs are just plain buggy for some tasks. Nautilus comes to mind. It has some problems with some mixes of mounting and permissions.

5.) Even if I know you have a specific GUI that works just fine it is easier for me to give you one or two lines in the CLI than to try to explain all the menus and mouse clicks to accomplish an otherwise simple task. I am lazy. :-)

6.) It is unnecessary and quite inefficient to ask you to download, install, and learn to use a 1 - 5 MB GUI program to accomplish what you can do in the CLI with a couple simple lines of text. It seems just plain wasteful to me.

I hope this was somewhat helpful to you.

Fred
Insanity: Doing the same thing over and over and each time expecting a different result.

Democracy is 2 wolves and a lamb voting on the menu. Liberty is an armed lamb protesting the electoral outcome. A Republic negates the need for an armed protest.
Post Reply

Return to “Newbie Questions”