Page 1 of 3 123 LastLast
Results 1 to 10 of 24

Thread: Thumbdrive permissions, mounting, executables

  1. #1
    Join Date
    Mar 2006
    Location
    Rumplestiltskin, Cal.
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Thumbdrive permissions, mounting, executables

    I'm having a big problem with my thumbdrive (AKA flashdrive, pendrive et alia).

    I want to use LastPass's sesame. It's written for Ubuntu. It worked fine, yesterday, after someone helped me with

    1-making a directory for the device
    2-mounting the device according to:

    sudo mount -t vfat /dev/sdb1 mnt/ -o uid=1000,gid=1000,umask=022

    and then, when (in Thunar GUI file manager) sesame was executed (clicked on), it ran properly.

    Today, on rebooting the computer the sesame is now reporting permissions problems AGAIN.

    I thought maybe I was barking up the wrong tree looking at the sesame and not the filesystem, so I searched these forums for some insight.

    I read here:

    http://ubuntuforums.org/showthread.p...1#post10839425

    and here:

    http://askubuntu.com/questions/88106...artition-table

    and would like to try

    fdisk -f

    to see if it is the easiest way to fix this mess.

    I've a .iso of Precise Pangolin v. 12.04 and can run the LiveCD and run fdisk. But I have some questions:

    1- how can I run fdisk -f in LiveCD as root, when I'm not a password allowed user?

    2- I only want to run the fdisk -f against the thumbdrive where the linux executable is. How is that doable?
    AMD Athlon II X4 620, 4gig ddr2-800, m/b MSI K9N6PGM2, 1T SATA, EVGA 9500GT, Brother MFC-240C prntr, LG DVD-rom GSA-H55N

  2. #2
    Join Date
    Apr 2012
    Location
    Phoenix, Arizona
    Beans
    166
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Thumbdrive permissions, mounting, executables

    Quote Originally Posted by Mark_in_Hollywood View Post
    I'm having a big problem with my thumbdrive (AKA flashdrive, pendrive et alia).

    I want to use LastPass's sesame. It's written for Ubuntu. It worked fine, yesterday, after someone helped me with

    1-making a directory for the device
    2-mounting the device according to:

    sudo mount -t vfat /dev/sdb1 mnt/ -o uid=1000,gid=1000,umask=022

    and then, when (in Thunar GUI file manager) sesame was executed (clicked on), it ran properly.

    Today, on rebooting the computer the sesame is now reporting permissions problems AGAIN.
    Let's focus on the above, I don't think fdisk is required or helpful for your problem.

    My best guess as to what is happening is that you mounted the device properly before rebooting, but that the system mounted it with different options when you rebooted. All you need to do is set it up to mount correctly at boot time, or alternately unmount it and re-type the sudo mount command you listed above.

    First a question or two: Do you leave this thumbdrive plugged in all the time, or do you just plug it in at some point after the system boots?

    Secondly, is the sesame application stored on the thumb drive? Or does the thumb drive just have data that sesame needs to access?

  3. #3
    Join Date
    Mar 2006
    Location
    Rumplestiltskin, Cal.
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Thumbdrive permissions, mounting, executables

    First a question or two: Do you leave this thumbdrive plugged in all the time, or do you just plug it in at some point after the system boots?

    It is always plugged into a usb hub

    Secondly, is the sesame application stored on the thumb drive? Or does the thumb drive just have data that sesame needs to access?

    Yes, sesame is on the thumb drive. It must be there for LastPass to make a 2 step authentication. Calling sesame opens a LastPass applet that makes a one time password. After authenticating that, a 2nd password must be entered from within a browser. (FF, Chrome, Opera, and even msie)

    I will umount the device and run the code again. Made no difference. sesame won't run.

    df -h


    /dev/sdc1 3.7G 925M 2.8G 25% /mnt

    sudo fdisk -l

    Disk /dev/sdc: 3942 MB, 3942645760 bytes
    122 heads, 62 sectors/track, 1018 cylinders, total 7700480 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x0008884e

    Device Boot Start End Blocks Id System
    /dev/sdc1 62 7700151 3850045 c W95 FAT32 (LBA)
    Last edited by Mark_in_Hollywood; May 31st, 2012 at 09:10 PM. Reason: fixed mistake
    AMD Athlon II X4 620, 4gig ddr2-800, m/b MSI K9N6PGM2, 1T SATA, EVGA 9500GT, Brother MFC-240C prntr, LG DVD-rom GSA-H55N

  4. #4
    Join Date
    Apr 2012
    Location
    Phoenix, Arizona
    Beans
    166
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Thumbdrive permissions, mounting, executables

    Do this for me:
    Code:
    mount
    and then
    Code:
    ls -ld /mnt
    The mount command will show what mount options are being used, while the ls command will show us the current permissions on /mnt.

  5. #5
    Join Date
    Mar 2006
    Location
    Rumplestiltskin, Cal.
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Thumbdrive permissions, mounting, executables

    relevant part of

    mount

    /dev/sdc1 on /media/LEXAR_ type vfat (rw,nosuid,nodev,uid=1000,gid=1000,shortname=mixed ,dmask=0077,utf8=1,showexec,flush,uhelper=udisks)

    and all the terminal said:

    mark@Lexington-19:/$ ls -ld /mnt
    ls: cannot access /mnt: No such file or directory
    AMD Athlon II X4 620, 4gig ddr2-800, m/b MSI K9N6PGM2, 1T SATA, EVGA 9500GT, Brother MFC-240C prntr, LG DVD-rom GSA-H55N

  6. #6
    Join Date
    Apr 2012
    Location
    Phoenix, Arizona
    Beans
    166
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Thumbdrive permissions, mounting, executables

    I'm confused because above it was mounted on /mnt, and now it is under /media/LEXAR_.

    Regardless, you need to do the following I think:

    Code:
    sudo umount /media/LEXAR_
    sudo mkdir /LEXAR                             (you can call this whatever you want)
    sudo mount /dev/sdc1 /LEXAR -o uid=1000,gid=1000,umask=022
    Test if the application works. Then, assuming it works, add a line like this to /etc/fstab:
    Code:
    /dev/disk/by-uuid/38BEBD30698717C7 /LEXAR    vfat    uid=1000,gid=1000,umask=022    0    2
    Note that you need to change the UUID at the beginning to match your thumbdrive's UUID; you can figure this out by doing
    Code:
    ls -l /dev/disk/by-uuid
    and looking for the one linked to /dev/sdc1.

    The reason we mount by UUID instead of just /dev/sdc1, is that the drive letters can change if you later plug in another thumb drive or something.

  7. #7
    Join Date
    Mar 2006
    Location
    Rumplestiltskin, Cal.
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Thumbdrive permissions, mounting, executables

    sesame is providing authentication. thanks.

    Working somewhat backwards:

    mark@Lexington-19:/$ ls -l /dev/disk/by-uuid
    total 0

    lrwxrwxrwx 1 root root 10 May 31 13:15 8874-D051 -> ../../sdc1

    so, while I'm guessing, "8874-D051" is the uuid for the thumbdrive (Lexar /dev/sdc1 - currently)

    sudo umount /media/LEXAR_
    sudo mkdir /LEXAR
    sudo mount /dev/sdc1 /LEXAR -o uid=1000,gid=1000,umask=022

    (WHY does the above line read "LEXAR_"? - none the less, the mkdir ran successfully. Well, it did seems to transfer all the objects on the removable drive to the /LEXAR - but I guess I can put them back on the thumbdrive.

    so, as sesame can be called by clicking it from a file manager (window) and as it operates as expected, I have created this line for the

    fstab

    #Entry for /dev/sdc1
    /dev/disk/by-uuid/8874-D051 /LEXAR vfat uid=1000,gid=1000,umask=022 0 2

    I hope to hear from strask before I save the fstab file.

    Do I need to backup fstab first?

    Do I need to reboot?

    just a few more moments of your time, sir.

    PS - I just noticed that the thumdrive is not showing up as a device in the panel dropdown menu. Yikes!
    Last edited by Mark_in_Hollywood; May 31st, 2012 at 10:09 PM. Reason: added
    AMD Athlon II X4 620, 4gig ddr2-800, m/b MSI K9N6PGM2, 1T SATA, EVGA 9500GT, Brother MFC-240C prntr, LG DVD-rom GSA-H55N

  8. #8
    Join Date
    Apr 2012
    Location
    Phoenix, Arizona
    Beans
    166
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Thumbdrive permissions, mounting, executables

    Quote Originally Posted by Mark_in_Hollywood View Post
    Well, it did seems to transfer all the objects on the removable drive to the /LEXAR - but I guess I can put them back on the thumbdrive.
    ...
    PS - I just noticed that the thumdrive is not showing up as a device in the panel dropdown menu. Yikes!
    We didn't transfer the objects from the thumb drive to the /LEXAR directory; what we did was move the whole thumb drive from the /media directory (which is for removable media that you hotplug all the time) to the /LEXAR mount point.

    Since you said you always leave the thumbdrive plugged in, we are causing the system to treat it just like it does an internal drive -- mount at boot, have a fixed home in the filesystem (/LEXAR) and don't show up as a removable drive.

    If that's not what you want, we can change it back but then you will have to type mount commands every time you reboot in order to get it working. Unless someone knows a better way.

  9. #9
    Join Date
    Apr 2012
    Location
    Phoenix, Arizona
    Beans
    166
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Thumbdrive permissions, mounting, executables

    Quote Originally Posted by Mark_in_Hollywood View Post
    #Entry for /dev/sdc1
    /dev/disk/by-uuid/8874-D051 /LEXAR vfat uid=1000,gid=1000,umask=022 0 2

    I hope to hear from strask before I save the fstab file.

    Do I need to backup fstab first?
    You should always make a backup of system files before modifying them, sorry for not reminding you of this in my original instructions.

    Your line looks good, by the way.

    Do I need to reboot?
    First, try "sudo umount /LEXAR" followed by "sudo mount /LEXAR"; when you don't provide mount options on the command line it looks at the /etc/fstab to figure out what you omitted, and that will confirm that the fstab is still healthy. That way you don't discover a problem at boot time, which can be painful.
    Last edited by strask; May 31st, 2012 at 10:26 PM. Reason: fix broken quote tag

  10. #10
    Join Date
    Mar 2006
    Location
    Rumplestiltskin, Cal.
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Thumbdrive permissions, mounting, executables

    mark@Lexington-19:/$ sudo umount /LEXAR
    [sudo] password for mark:
    mark@Lexington-19:/$ sudo mount /LEXAR
    mount: mount point /LEXAR does not exist

    please know that the thumbdrive, named LEXAR does not appear in the panel's drop down menu. All this mount/umount should have it showing as: LEXAR.

    I cannot find an object (folder, device, etc.) in neither / nor /home - nor in /etc but there is, in /media a LEXAR. I can't open that folder as non-root-user. As root, it opens, but appears empty.

    PS - fstab w/o added /sdc1 & uuid is backed up within /etc
    Last edited by Mark_in_Hollywood; May 31st, 2012 at 10:38 PM. Reason: added info
    AMD Athlon II X4 620, 4gig ddr2-800, m/b MSI K9N6PGM2, 1T SATA, EVGA 9500GT, Brother MFC-240C prntr, LG DVD-rom GSA-H55N

Page 1 of 3 123 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •