FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Kubuntu User

 
 
LinkBack Thread Tools
 
Old 01-23-2010, 01:19 PM
Mark Greenwood
 
Default How To Make USB Drive Writeable?

This has been bugging me for some time. It's not KDE specific because it does it on Ubuntu and Mythbuntu boxes too, but I'll limit this to what happens on Kubuntu.

I have an external USB hard drive. When I connect it to my computer, running Karmic, the New Device Notifier thing pops up and says I've inserted a new disc and would I like to open it with Dolphin. "Why yes I would", I reply, "otherwise why would I have plugged it in?".... Ahem... Anyway, a Dolphin window for the drive duly opens but I do not have permission to write files to it. Why does the system allow me to mount the disc as a normal user and then forbid that user to write to it? It's extremely unhelpful.

What I've done as a workaround is to switch to a terminal, "sudo mkdir" a bunch of directories, and then change the permissions on those directories so that the user who says "Yes I want to mount the disc" is also able to actually use it. But I feel there must be some neater, policy type way of achieving this, so that my normal user can create directories at the root of mounted external discs, but if there is I've yet to find it. Does anybody know? Mandriva didn't annoy me like this... (and if that's not flame-bait I don't know what is )

Thanks,

Mark

--
kubuntu-users mailing list
kubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/kubuntu-users
 
Old 01-23-2010, 01:55 PM
Nils Kassube
 
Default How To Make USB Drive Writeable?

Mark Greenwood wrote:
> I have an external USB hard drive. When I connect it to my computer,
> running Karmic, the New Device Notifier thing pops up and says I've
> inserted a new disc and would I like to open it with Dolphin. "Why
> yes I would", I reply, "otherwise why would I have plugged it
> in?".... Ahem...

Well, maybe you don't want to use it now but want to reformat it, which
means that it should not be mounted.

> Anyway, a Dolphin window for the drive duly opens
> but I do not have permission to write files to it. Why does the
> system allow me to mount the disc as a normal user and then forbid
> that user to write to it? It's extremely unhelpful.

What type of file system is on the disk? If it is something like FAT,
you should have write permission already. But if it is ext2/3/4 the
permissions of individual files / directories are stored in the file
system. You could use the command

sudo chmod 777 /media/disk

where you would replace the /media/disk with the actual mount point.
Then everybody may write to the root directory of the disk. But beware,
write access for everybody also means that everyone can delete
everything from the disk.


Nils

--
kubuntu-users mailing list
kubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/kubuntu-users
 
Old 01-23-2010, 02:15 PM
Mark Greenwood
 
Default How To Make USB Drive Writeable?

On Saturday 23 Jan 2010 14:55:13 Nils Kassube wrote:
> Mark Greenwood wrote:
> > I have an external USB hard drive. When I connect it to my computer,
> > running Karmic, the New Device Notifier thing pops up and says I've
> > inserted a new disc and would I like to open it with Dolphin. "Why
> > yes I would", I reply, "otherwise why would I have plugged it
> > in?".... Ahem...
>
> Well, maybe you don't want to use it now but want to reformat it, which
> means that it should not be mounted.

Yeah OK, that's fair enough. I think things should be automounted but that's a personal perference I guess.

> > Anyway, a Dolphin window for the drive duly opens
> > but I do not have permission to write files to it. Why does the
> > system allow me to mount the disc as a normal user and then forbid
> > that user to write to it? It's extremely unhelpful.
>
> What type of file system is on the disk? If it is something like FAT,
> you should have write permission already. But if it is ext2/3/4 the
> permissions of individual files / directories are stored in the file
> system. You could use the command
>
> sudo chmod 777 /media/disk
>
> where you would replace the /media/disk with the actual mount point.
> Then everybody may write to the root directory of the disk. But beware,
> write access for everybody also means that everyone can delete
> everything from the disk.
>

It's ext4. (It's 1.5TB so FAT is not an option) The disk gets automounted at /media/Backups (Backups is the partition label so that at least is helpful). I initially tried 'sudo chown bob /media/Backups' - to change the owner of /media/Backups to be my normal user. But as soon as I unplug the disk, /media/Backups is also removed and the next time I plug the disk in I have to go through that process again. Creating /media/Backups before plugging the disk in causes it to be mounted as /media/Backups-1, so that doesn't work either.

While I understand that there are security considerations, I'm looking at this from the point of view of a *desktop* computer where I really don't care about multi-user access most of the time, I just want to be able to use my backup disc. And my chown solution preserves the security anyway. I just wish it would be remembered.

I've even tried adding a line to /etc/fstab to get the disc mounted at a predefined directory every time, but when I do this hal refuses to mount it and I have to 'mount /media/Backups' every single time I insert it, so that's not a solution either.

Mark

>
> Nils
>
>

--
kubuntu-users mailing list
kubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/kubuntu-users
 
Old 01-23-2010, 02:44 PM
"Alan Dacey Sr."
 
Default How To Make USB Drive Writeable?

>
> I've even tried adding a line to /etc/fstab to get the disc mounted at a
> predefined directory every time, but when I do this hal refuses to mount
> it and I have to 'mount /media/Backups' every single time I insert it, so
> that's not a solution either.
>
> Mark
>
>

Did you make the directory entry on fstab in your /home folder or in the
/media folder? Unless you changed it you basically only have read permissions
there while you have all you need in everywhere in your /home directory. I
could very well be wrong on this but I think if you use the UUID in an fstab
line then it should auto-mount OK somewhere in your /home folder. I don't
have an external hhd to test it myself, but it could be worth a try.

--
Alan

"We the people are the rightful masters of both Congress and the courts, not
to overthrow the Constitution but to overthrow the men who pervert the
Constitution."
Abraham Lincoln

--
kubuntu-users mailing list
kubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/kubuntu-users
 
Old 01-23-2010, 02:50 PM
Goh Lip
 
Default How To Make USB Drive Writeable?

On 01/23/2010 11:15 PM, Mark Greenwood wrote:


> I initially tried 'sudo chown bob /media/Backups' -

Should this be "sudo chown -R bob:bob /media/Backups" ?
Hope this helps.

Regards - Goh Lip


--
kubuntu-users mailing list
kubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/kubuntu-users
 
Old 01-23-2010, 03:00 PM
Reinhold Rumberger
 
Default How To Make USB Drive Writeable?

On Saturday 23 January 2010, Mark Greenwood wrote:
> On Saturday 23 Jan 2010 14:55:13 Nils Kassube wrote:
> > Mark Greenwood wrote:
> > > Anyway, a Dolphin window for the drive duly opens
> > > but I do not have permission to write files to it. Why does
> > > the system allow me to mount the disc as a normal user and
> > > then forbid that user to write to it? It's extremely
> > > unhelpful.
> >
> > What type of file system is on the disk? If it is something like
> > FAT, you should have write permission already. But if it is
> > ext2/3/4 the permissions of individual files / directories are
> > stored in the file system. You could use the command
> >
> > sudo chmod 777 /media/disk
> >
> > where you would replace the /media/disk with the actual mount
> > point. Then everybody may write to the root directory of the
> > disk. But beware, write access for everybody also means that
> > everyone can delete everything from the disk.
>
> It's ext4. (It's 1.5TB so FAT is not an option) The disk gets
> automounted at /media/Backups (Backups is the partition label so
> that at least is helpful). I initially tried 'sudo chown bob
> /media/Backups' - to change the owner of /media/Backups to be my

You may want to do sudo chown -R bob /media/Backups/
That makes the chown command recursive.

(Just a guess, but I think
What you are actually doing with your command, is make the directory
the drive is mounted to belong to you. Since that is deleted and
recreated, it doesn't help.
If this doesn't work, try cd'ing to /media/Backups and applying the
chown to the current directory. I know it will work somehow, since it
works perfectly here.

> normal user. But as soon as I unplug the disk, /media/Backups is
> also removed and the next time I plug the disk in I have to go
> through that process again. Creating /media/Backups before
> plugging the disk in causes it to be mounted as /media/Backups-1,
> so that doesn't work either.

<snip>

> I've even tried adding a line to /etc/fstab to get the disc
> mounted at a predefined directory every time, but when I do this
> hal refuses to mount it and I have to 'mount /media/Backups'
> every single time I insert it, so that's not a solution either.

I don't think any solution involving fstab can be more than a
workaround. Chown'ing is the solution.

--Reinhold

--
kubuntu-users mailing list
kubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/kubuntu-users
 
Old 01-23-2010, 04:23 PM
Nils Kassube
 
Default How To Make USB Drive Writeable?

Mark Greenwood wrote:
> On Saturday 23 Jan 2010 14:55:13 Nils Kassube wrote:
> > Mark Greenwood wrote:
> > > Anyway, a Dolphin window for the drive duly opens
> > > but I do not have permission to write files to it. Why does the
> > > system allow me to mount the disc as a normal user and then
> > > forbid that user to write to it? It's extremely unhelpful.
> >
> > What type of file system is on the disk? If it is something like
> > FAT, you should have write permission already. But if it is
> > ext2/3/4 the permissions of individual files / directories are
> > stored in the file system. You could use the command
> >
> > sudo chmod 777 /media/disk
> >
> > where you would replace the /media/disk with the actual mount
> > point. Then everybody may write to the root directory of the disk.
> > But beware, write access for everybody also means that everyone can
> > delete everything from the disk.
>
> It's ext4. (It's 1.5TB so FAT is not an option) The disk gets
> automounted at /media/Backups (Backups is the partition label so
> that at least is helpful). I initially tried 'sudo chown bob
> /media/Backups' - to change the owner of /media/Backups to be my
> normal user. But as soon as I unplug the disk, /media/Backups is
> also removed and the next time I plug the disk in I have to go
> through that process again.

That's interesting because I have a similar setup for one external disk
which is mounted by label. I changed the ownership of the root directory
of the disk to nils:nils and the change persists if I unmount the disk
and mount it again. My file system is ext3 and not ext4, but I think
that shouldn't make a difference. I also tried the change I suggested in
my previous mail and it persists over mounts.

> I've even tried adding a line to /etc/fstab to get the disc mounted
> at a predefined directory every time, but when I do this hal refuses
> to mount it and I have to 'mount /media/Backups' every single time I
> insert it, so that's not a solution either.

I think if you add the users mount option to the fstab entry it should
be mounted by hal as well.


Nils

--
kubuntu-users mailing list
kubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/kubuntu-users
 
Old 01-23-2010, 05:41 PM
Jim MacLeod
 
Default How To Make USB Drive Writeable?

Mark Greenwood wrote:

> This has been bugging me for some time. It's not KDE specific because it
> does it on Ubuntu and Mythbuntu boxes too, but I'll limit this to what
> happens on Kubuntu.
>
> I have an external USB hard drive. When I connect it to my computer,
> running Karmic, the New Device Notifier thing pops up and says I've
> inserted a new disc and would I like to open it with Dolphin. "Why yes I
> would", I reply, "otherwise why would I have plugged it in?".... Ahem...
> Anyway, a Dolphin window for the drive duly opens but I do not have
> permission to write files to it. Why does the system allow me to mount the
> disc as a normal user and then forbid that user to write to it? It's
> extremely unhelpful.
>
I don't have a usb hdd but do use a usb stick. I formatted it and created
folders for myself and another user, then set relevant owner permissions.
Now I just plug in the stick and can read/write any time without touching
fstab

> Thanks,
>
> Mark
HTH

JIM



--
kubuntu-users mailing list
kubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/kubuntu-users
 
Old 01-23-2010, 05:55 PM
Hans Henry von Tresckow
 
Default How To Make USB Drive Writeable?

On Sat, Jan 23, 2010 at 6:19 AM, Mark Greenwood <fatgerman@ntlworld.com> wrote:

This has been bugging me for some time. It's not KDE specific because it does it on Ubuntu and Mythbuntu boxes too, but I'll limit this to what happens on Kubuntu.



I have an external USB hard drive. When I connect it to my computer, running Karmic, the New Device Notifier thing pops up and says I've inserted a new disc and would I like to open it with Dolphin. "Why yes I would", I reply, "otherwise why would I have plugged it in?".... Ahem... Anyway, a Dolphin window for the drive duly opens but I do not have permission to write files to it. Why does the system allow me to mount the disc as a normal user and then forbid that user to write to it? It's extremely unhelpful.




What I've done as a workaround is to switch to a terminal, "sudo mkdir" a bunch of directories, and then change the permissions on those directories so that the user who says "Yes I want to mount the disc" is also able to actually use it. But I feel there must be some neater, policy type way of achieving this, so that my normal user can create directories at the root of mounted external discs, but if there is I've yet to find it. Does anybody know? Mandriva didn't annoy me like this... (and if that's not flame-bait I don't know what is )




Thanks,



Mark



--
Did you by any chance set this drive up under Mandiva? The reason I ask is that when I switched from Fedora to Kubuntu, the UserID for the same username was different, so that files that were owned by me under fedora were no longer mine under Kubuntu.

--
Henry von Tresckow (hvontres)
Jonathan Swift *- "May you live every day of your life."
--
kubuntu-users mailing list
kubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/kubuntu-users
 
Old 01-23-2010, 06:42 PM
Jerry Lapham
 
Default How To Make USB Drive Writeable?

On Saturday 23 January 2010 01:55:00 pm Hans Henry von Tresckow wrote:

> Did you by any chance set this drive up under Mandiva? The reason I ask is
> that when I switched from Fedora to Kubuntu, the UserID for the same
> username was different, so that files that were owned by me under fedora
> were no longer mine under Kubuntu.
>

That caused me a lot of problems when I was switching back and forth between
Mandriva and Kubuntu. Users started at 500 with Mandriva and 1000 with
Kubuntu so "jerry" wasn't "jerry". :-)

-Jerry
--
=============================================
Jerry Lapham
Monroe, OH 45050
rjlapham@gmail.com
=============================================
All generalizations are false.

--
kubuntu-users mailing list
kubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/kubuntu-users
 

Thread Tools




All times are GMT. The time now is 07:48 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org