No permissions to Drive I partitioned?

New to Debian (Or Linux in general)? Ask your questions here!

No permissions to Drive I partitioned?

Postby LearningCurve » 2010-02-19 13:53

I have a bit of a problem in my new install of Lenny (5.0.1). The machine in question was running XP and has a C: drive (system) and two other had drives (ide) one with music on and the other with videos. All were NTFS naturally.

I installed Lenny and re partitioned the system drive accordingly with swap and root partitions, no problems there.

The next phase was to convert the other two drives to ext3. The music drive has been backed up so the plan was to re-partition that to ext3, copy the video files to it and then re partition the now ex video drive and restore the music files to that.

I ran Gparted and partitioned the old music drive to ext3 but could not then mount it, it didn't do this after formating. I did not have permissions to mount the drive.
I read on a forum how to mount the drive from Terminal, going to /mnt, mkdir VideoDrive, mount /dev/hdb1 VideoDrive and presto it was mounted. However I still did not have permissions to it and could therefore not create directories.

Right clicking on the drive and showing properties now showed owner as root ~ create and delete files, group as root ~ access files, others ~ access files. All of these drop-downs are unavailable for changing.

I went into users and groups. There were groups there called mike and root so I selected both root user and mike user as members of both of these groups. Nope.

In the drive properties I entered Mount Point as /mnt/VideoDrive, File System as ext3, and Mount Options as defaults,unmask=000 0 0. The other forum I read stated that unmask is used to allow access to all users.

This did not help.

I then transfered these options to the Volume properties, again no joy.

I have added entries into the fstab and mtab files still no joy.

Any help would be much appreciated.
User avatar
LearningCurve
 
Posts: 9
Joined: 2010-02-19 13:19

Re: No permissions to Drive I partitioned?

Postby _Alex_ » 2010-02-19 14:32

Hi,

You can change permission of a directory by using chmod.

In your case, you can run (as root).
Code: Select all
chmod 777 /mnt/VideoDrive/


This allows all users all permissions to the drive /mnt/VideoDrive/
I think this also allows access to the drive mounted there. You can also change ownership using chown.

LearningCurve wrote:I ran Gparted and partitioned the old music drive to ext3 but could not then mount it, it didn't do this after formating. I did not have permissions to mount the drive.

Indeed, you need to be root to mount a disk.

Hope this helps,

Alex.




LearningCurve wrote:I ran Gparted and partitioned the old music drive to ext3 but could not then mount it, it didn't do this after formating. I did not have permissions to mount the drive.
I read on a forum how to mount the drive from Terminal, going to /mnt, mkdir VideoDrive, mount /dev/hdb1 VideoDrive and presto it was mounted. However I still did not have permissions to it and could therefore not create directories.

Right clicking on the drive and showing properties now showed owner as root ~ create and delete files, group as root ~ access files, others ~ access files. All of these drop-downs are unavailable for changing.

I went into users and groups. There were groups there called mike and root so I selected both root user and mike user as members of both of these groups. Nope.

In the drive properties I entered Mount Point as /mnt/VideoDrive, File System as ext3, and Mount Options as defaults,unmask=000 0 0. The other forum I read stated that unmask is used to allow access to all users.

Last edited by _Alex_ on 2010-02-19 15:15, edited 2 times in total.
User avatar
_Alex_
 
Posts: 459
Joined: 2008-12-20 17:49
Location: Netherlands

.

Postby llivv » 2010-02-19 14:40

.
Last edited by llivv on 2019-04-17 21:27, edited 1 time in total.
In memory of Ian Ashley Murdock (1973 - 2015) founder of the Debian project.
User avatar
llivv
 
Posts: 5484
Joined: 2007-02-14 18:10
Location: cold storage

Re: No permissions to Drive I partitioned?

Postby LearningCurve » 2010-02-19 20:57

I did chmod on /mnt/VideoDrive and when checked was successful but made not difference to accessing drive or permissions in properties.

I also used chown mike:mike /dev/hdb1 which was again successful but again made no changes to drive.

Permissions still show owner and group as root with no options changeable.

Drive is mounting on startup now but not usable.

Mike
User avatar
LearningCurve
 
Posts: 9
Joined: 2010-02-19 13:19

Re: No permissions to Drive I partitioned?

Postby Raffles10 » 2010-02-19 21:05

Try this as root:

Code: Select all
chown -R mike:mike /mnt/VideoDrive
Debian Squeeze + KDE 4.4.4 + AMD Athlon™ 64 X2 Dual Core Processor 6000 + nVidia GeForce 8600
User avatar
Raffles10
 
Posts: 192
Joined: 2008-12-09 16:36
Location: London, UK

Re: No permissions to Drive I partitioned?

Postby _Alex_ » 2010-02-19 22:51

Hi,

LearningCurve wrote:I did chmod on /mnt/VideoDrive and when checked was successful but made not difference to accessing drive or permissions in properties.

You have to give the chmod-command after mounting the disk.
Also, if you only use 'chmod 777 /mnt/VideoDrive/', it will only work for the first 'layer' of the mounted disk.
To change permissions of all the files in all subdirectories, you can use (after mounting):
Code: Select all
chmod 777 /mnt/VideoDrive -R

(R for recursive).

However, depending on what you want on the long run the solution with the ownership-change might me better.
Can you show us the output of ' ls -l' in the /mnt/VideoDrive/ dir after changing ownership of the files as suggested by llivv and Raffles10 ? This will give info about the ownership and permissions of that directory .

A.
User avatar
_Alex_
 
Posts: 459
Joined: 2008-12-20 17:49
Location: Netherlands

Re: No permissions to Drive I partitioned?

Postby LearningCurve » 2010-02-20 07:02

There are no files in /mnt/VideoDrive so it's returning nothing so from /mnt I did ls -l and it returned

total 4
drwxrwxrwx 2 mike mike 4096 2010-02-19 11:56 VideoDrive

the entry in fstab is now
/dev/hdb1 /VideoDrive ext3 defaults 0 0

and the one in mtab is
/dev/hdb1 /VideoDrive ext3 rw 0 0

The drive properties, permissions is still showing

Owner root create and delete files
Group root Access files
Others Access files

none of these are accessible and I still can't create folders, copy files etc.
User avatar
LearningCurve
 
Posts: 9
Joined: 2010-02-19 13:19

Re: No permissions to Drive I partitioned?

Postby _Alex_ » 2010-02-20 12:34

LearningCurve wrote:There are no files in /mnt/VideoDrive so it's returning nothing so from /mnt I did ls -l and it returned

total 4
drwxrwxrwx 2 mike mike 4096 2010-02-19 11:56 VideoDrive


If there are no files then the system you want to mount is not mounted. I thought you mentioned that you did manage to mount the system by hand.
I think it is better to first check if you can mount the system by hand and use it as you want. If that works, then try fstab.

Alex.
User avatar
_Alex_
 
Posts: 459
Joined: 2008-12-20 17:49
Location: Netherlands

Re: No permissions to Drive I partitioned?

Postby LearningCurve » 2010-02-20 13:11

It is mounted, when I right click on the drive icon on the desktop (which didn't appear there when the drive was not mounted) the unmount volume option is "bright" and available. When you click it, it errors saying that "you are not privileged to unmount this volume".

I don't understand why this should happen, when I looked at a couple of live discs of other distros I didn't get permissions errors like this.

Having installed Lenny and then partitioned and formatted the drive as user mike surely I should be the owner of it and have full access rights to it.

Anyway, still unable to use it at the moment.
User avatar
LearningCurve
 
Posts: 9
Joined: 2010-02-19 13:19

.

Postby llivv » 2010-02-20 13:34

.
Last edited by llivv on 2019-04-17 21:27, edited 1 time in total.
In memory of Ian Ashley Murdock (1973 - 2015) founder of the Debian project.
User avatar
llivv
 
Posts: 5484
Joined: 2007-02-14 18:10
Location: cold storage

Re: No permissions to Drive I partitioned?

Postby bluesdog » 2010-02-20 19:27

It should not be necessary to chmod 777 a mount point. Avoid granting universal full access to any filesystem.

Designate ownership in /etc/fstab with a line like:
Code: Select all
/dev/hda1       /mnt/hda1       ext3    defaults        0       1


'defaults' includes group access for members of the 'users' group.

Normal user full access to a mount point can be achieved by (root) chown username:group /mountpoint, adding the -R switch if the location already contains files/folders.

A typical example:
Code: Select all
chown -R mike:users /mnt/VideoDrive


When /etc/fstab has been edited correctly, you may test by issuing the (root) command
Code: Select all
mount -a
followed by
Code: Select all
mount -l


LearningCurve wrote: The other forum I read stated that unmask is used to allow access to all users.


The command is 'umask', not 'unmask'
'umask' is not required for ext3 formatted partitions.
See man umask for proper useage.
User avatar
bluesdog
 
Posts: 2082
Joined: 2006-02-01 09:02
Location: Similkameen, British Columbia, Canada

Re: No permissions to Drive I partitioned?

Postby LearningCurve » 2010-02-21 13:14

Hi all,

Sorry for the delay, my monitor went down and I've had to move around and dig out another one to replace it, glad to be a geek and have spares. Let me take it a bit at a time,

llivv,

llivv wrote:What file manager are you getting this info from?


I stated before that this is the window which appears when I right click on the drive icon on the desktop. This icon does not appear on the desktop if the drive is not mounted, it will then only appear in the "computer" folder.

llivv wrote:What desktop are you using? Gnome - Kde - XFCE - LXDE?


Very sorry, I forgot to mention that from the start, I simply did a basic default install (apart from manually partitioning the drive), plus Samba server, using the defult Gnome desktop.

llivv wrote:You are able to access the drives as root from the commandline, correct?


I am very new to the commandline in Linux, although I was very used to it in DOS years ago! I had not tried to be honest, but have now looked up the copy command and copied /etc/fstab to /mnt/VideoDrive which worked. ls -l showed it as belonging to root. It did not appear on the drive when the drive icon is clicked. I personally would not have expected it to as they are different folders but this mount directory is confusing me I have to confess. perhaps someone could explain it to me.

llivv wrote:After you get the Owner root and Group root from the (file manager your using)? can you double check to see that the owner and group are still mike:mike as listed when you are root in the terminal...


I have got the same result as before showing as mike:mike


bluesdog

bluesdog wrote:Designate ownership in /etc/fstab with a line like: Code: Select all/dev/hda1       /mnt/hda1       ext3    defaults        0       1


as you can see from my earlier post, the entry in fstab is the same as yours except for the 0/1 at the end of the line. I have changed mine from a 0 to a 1, made the similar change in mtab, shut right down and rebooted and it has made no difference.

bluesdog wrote:Normal user full access to a mount point can be achieved by (root) chown username:group /mountpoint, adding the -R switch if the location already contains files/folders.A typical example: Code: Select allchown -R mike:users /mnt/VideoDrive


again as earlier I have done this and as there are no files in /mnt/VideoDrive to show, I did it from /mnt and it showed /mnt/VideoDrive as being owned by user:group, mike:mike and yet in practice I still cannot use the drive.

bluesdog wrote:When /etc/fstab has been edited correctly, you may test by issuing the (root) command Code: Select allmount -afollowed by Code: Select allmount -l


yep have now done that, thanks. After -l in the list was /dev/hdb1 on VideoDrive type ext3 (rw), excellent, except that nothing has actually changed. Went to the desktop, double clicked drive icon, shows contents as lost + found only as before, right clicked on background, create directory option in dropdown list is still unavailable. Selected properties again and low and behold in permissions nothing has changed, still as detailed before. So I shutdown, rebooted, went back into root terminal and redid mount -l which showed exactly the same line complete with read/write flags and everthing else is still the same.

bluesdog wrote:The command is 'umask', not 'unmask''umask' is not required for ext3 formatted partitions.See man umask for proper useage.


yep, sorry, typo, I did umask not unmask and have since removed it simply leaving "defaults" but it's nice to know that it isn't required for ext3, I'll remember that one, thanks.


Now I'm by now means new to computers although I have only been using Linux for about a year, (mostly using, not exploring unfortunately), so I can fllow pretty well what we have been doing and whyand it seems to me that everything is showing that there should be no problems and that it should be working properly, so I'm stumped.

My next thought, unless anyone has seen something here, is that I have left another partition on hda so that I could install another distro or upgrade later if wanted, so if I re-install on that partition and can then compare the two in case the second install works and maybe find the solution. If it doesn't work properly there either, then at least it will show that nothings corrupted here.
User avatar
LearningCurve
 
Posts: 9
Joined: 2010-02-19 13:19

Re: No permissions to Drive I partitioned?

Postby fsmithred » 2010-02-21 17:01

LearningCurve wrote:
bluesdog wrote:Designate ownership in /etc/fstab with a line like: Code: Select all/dev/hda1       /mnt/hda1       ext3    defaults        0       1


as you can see from my earlier post, the entry in fstab is the same as yours except for the 0/1 at the end of the line. I have changed mine from a 0 to a 1, made the similar change in mtab, shut right down and rebooted and it has made no difference.


And your looks like this:
LearningCurve wrote:the entry in fstab is now
/dev/hdb1 /VideoDrive ext3 defaults 0 0

It looks like the partition is mounted at /VideoDrive, but you keep looking for it at /mnt/VideoDrive.

Try
Code: Select all
ls -l /VideoDrive
Then edit fstab if you really want it to mount at /mnt/VideoDrive.
fsmithred
 
Posts: 1872
Joined: 2008-01-02 14:52

Re: No permissions to Drive I partitioned?

Postby LearningCurve » 2010-02-21 19:44

Bingo, I really hate it when that happens.

You look at a piece of code or commands and because you've looked at them so many times, you don't really see them any more, you just see what you expect to see.

I haven't got a clue when it was but I was still seeing the /mnt when it wasn't there any more. I even put it in the posts without noticing that what I was typing was the truth and not what I thought it was, bugger.

Anyway thanks so much for the fresh set of eyes pointing it out to me.

I checked /VideoDrive and sure enough it was root:root so I used chown again on the right one and there it was just as it should be. Not being bothered about it being in /mnt I have deleted that one and left the "new" /VideoDrive. I shut down again and restarted and it's still fine.

Thank you all for your kind help and advice, much appreciated.

Maybe the industry is right and the old geek is and burnt out and past it, but I'm not going to lay down and give up.

Best to all,
Mike
User avatar
LearningCurve
 
Posts: 9
Joined: 2010-02-19 13:19

Re: No permissions to Drive I partitioned?

Postby fsmithred » 2010-02-22 00:44

There are quite a few of us older guys around here. Don't feel bad about it. Just remember that old age and treachery will beat youth and skill.

Changing the ownership of the mount point does nothing. When you mount the partition, it just goes back to root:root. The ownership of the directories on that partition is important. You can write to the ones you own.
fsmithred
 
Posts: 1872
Joined: 2008-01-02 14:52

Next

Return to Beginners Questions

Who is online

Users browsing this forum: No registered users and 9 guests

fashionable