Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Mounted drive - permissions

  • 05-09-2010 4:29pm
    #1
    Closed Accounts Posts: 910 ✭✭✭


    I've just mounted a spare partition to a folder, and its set the permissions to root.

    I changed to root in a termila (using su) and did the following:
    mount /dev/sda3 /home/bw/MediaFiles

    I've tried a number of commands using chmod, but after 6 or 8 various attempts, I am just a tad worried I may cause permission issues, having set/unset/ thigns with so many variations.

    So, how do I allow full access to the bw user to this newly mounted drive/folder?


Comments

  • Registered Users, Registered Users 2 Posts: 218 ✭✭Tillotson


    Check drive is actually mounted: '$ sudo mount'. Can you post output of '$ ls -l ~/bw'. The probable solution is :
    $ sudo chown -R bw ~/bw
    $ find ~/bw -type d -exec chmod -R u+rxw {}\; 
    $ find ~/bw -type f -exec chmod -R u+rw {}\;
    

    Good luck.


  • Closed Accounts Posts: 910 ✭✭✭Jagera


    EDIT - the initial sudo chown command seems to have worked. Despite the error I got in the second command, I now have access to this drive.


    output of sudo mount, highlighted mounted partition in red

    /dev/sda5 on / type ext4 (rw,errors=remount-ro)
    proc on /proc type proc (rw,noexec,nosuid,nodev)
    none on /sys type sysfs (rw,noexec,nosuid,nodev)
    none on /sys/fs/fuse/connections type fusectl (rw)
    none on /sys/kernel/debug type debugfs (rw)
    none on /sys/kernel/security type securityfs (rw)
    none on /dev type devtmpfs (rw,mode=0755)
    none on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
    none on /dev/shm type tmpfs (rw,nosuid,nodev)
    none on /var/run type tmpfs (rw,nosuid,mode=0755)
    none on /var/lock type tmpfs (rw,noexec,nosuid,nodev)
    none on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
    /dev/sdb5 on /home type ext4 (rw)
    binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
    gvfs-fuse-daemon on /home/bw/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=bw)
    /dev/sr1 on /media/Mobile Partner type iso9660 (ro,nosuid,nodev,uhelper=udisks,uid=1000,gid=1000,iocharset=utf8,mode=0400,dmode=0500)
    /dev/sda3 on /home/bw/MediaFiles type ext4 (rw)
    /dev/sdd1 on /media/WD_MINI type fuseblk (rw,nosuid,nodev,allow_other,blksize=4096,default_permissions)


    output of ls

    total 16 drwxr-xr-x 2 bw root 16384 2010-09-05 16:12 lost+found

    Juts wanted to confirm your command:
    my login is bw, mounted folder is ~/bw/MediaFiles

    I ran the first command as:
    sudo chown -R bw ~/MediaFiles
    
    which ran without any return message.

    The next command failed, I ran as:
    find ~/MediaFiles -type d -exec chmod -R u+rxw {}\;
    
    and received the following: find: missing argument to `-exec

    have I mistyped or misread something?


  • Registered Users, Registered Users 2 Posts: 218 ✭✭Tillotson


    My mistake, missed a space between curly brackets and backslash.

    Commands should be:
    $ find ~/MediaFiles -type d -exec chmod -R u+rxw {} \; 
    $ find ~/MediaFiles -type f -exec chmod -R u+rw {} \;
    


  • Closed Accounts Posts: 910 ✭✭✭Jagera


    I am losing the mount after reboot, so the MediaFiles folder is on the other partition, where my /home folder is located.


  • Registered Users, Registered Users 2 Posts: 218 ✭✭Tillotson


    To make the drive mount on boot you'll have to edit "/etc/fstab"

    Here is a good guide http://ubuntuforums.org/showthread.php?t=283131


  • Advertisement
Advertisement