Results 1 to 9 of 9

Thread: additional hard drive - su can only write

  1. #1

    Default additional hard drive - su can only write

    Hello...


    I have a hard drive setup:
    http://picpaste.com/634aed03658d4e37...9c7b2f4df0.png

    detail:
    http://picpaste.com/584294509255193d...52e5fc71ce.png

    I would like sdb2 (/backup) to be used for an expanded owncloud setup.
    However I can only write as root to that drive ( ie when copying and pasting files)

    I have to assume I borked fstab, but since I never mess with I am unsure what I am doing and need expert advice:
    here is a copy of what it currently is:


    /dev/disk/by-id/ata-ST3000DM001-1CH166_Z1F3ZH4L-part1 swap swap defaults 0 0
    /dev/disk/by-id/ata-KINGSTON_SV300S37A120G_50026B723B0177FC-part1 / ext4 acl,user_xattr 1 1
    /dev/disk/by-id/ata-ST3000DM001-1CH166_Z1F3ZH4L-part2 /backup ext4 acl,user
    /dev/disk/by-id/ata-KINGSTON_SV300S37A120G_50026B723B0177FC-part2 /home ext4 acl,user_xattr 1 2



    I am pretty sure my problem is simple, not sure how to fix though...

    Thank you for your time
    qu1nn
    Pentium D 820, 2.80GHz, Intel D945PSN ATX, PowerColor Radeon HD7870, Geil DDR2, (1GB x 2) Dual Channel 667MHz Suse 13.2, KDE
    Haswell i4771, 3.5GHz, Asus Z87-WS ATX, Club3d R9 280X RoyalQueen, Corsair 8GBx2, Corsair AX860 PS, openSuse 13.1, KDE

  2. #2
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    15,674
    Blog Entries
    3

    Default Re: additional hard drive - su can only write

    Quote Originally Posted by qu1nn View Post
    I am pretty sure my problem is simple, not sure how to fix though...
    Code:
    # chmod 1777 /backup
    should allow anybody to write.

    I would recommend that you add "noexec" to the fstab options, if this is only for backups. That prevents programs from being run directly from that file system.
    openSUSE Leap 15.3; KDE Plasma 5.18.6;

  3. #3
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    29,788

    Default Re: additional hard drive - su can only write

    And of course that advice is poerfectly vallid. As setting all permissions to any dirctory/file will make it readable, writebal, executable by all the users. But those permission are not invented for nothing. Thus understanding them and apply them correctly may be a good idea.
    Henk van Velden

  4. #4
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    15,674
    Blog Entries
    3

    Default Re: additional hard drive - su can only write

    Quote Originally Posted by hcvv View Post
    Thus understanding them and apply them correctly may be a good idea.
    Agreed.

    He only asked how. He didn't ask if it was a good idea.

    If it were my system, I would instead create some subdirectories with more permissive writing.
    openSUSE Leap 15.3; KDE Plasma 5.18.6;

  5. #5
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    29,788

    Default Re: additional hard drive - su can only write

    Quote Originally Posted by nrickert View Post
    Agreed.

    He only asked how. He didn't ask if it was a good idea.

    If it were my system, I would instead create some subdirectories with more permissive writing.
    I know that you know. It is allways difficult to give detailed advice on such a theme because the word "backup" does not explain much. Is it a backup the system manager makes, will the users maintain their own backups there, etc.

    The only thing I wanted to stress to the OP the beside following your advice, it would be better to think over what he wants and then how to achieve that.
    Henk van Velden

  6. #6

    Default Re: additional hard drive - su can only write

    First off thank you for your quick responses, it is appreciated.

    I am a home user putzing around with the using owncloud to get away from samba file sharing. This would also allow me to bail from dropbox and take control of my data (killing 2 birds with one stone)...
    The files would be accessible on all of the linux boxes via webdavs in dolphin (or the android app for all of the other devices used by the family).

    I was planning on using dev/sdb2 for the following:
    (1) a subfolder called /dev/sdb2/backup/share for expanding the local external storage in owncloud.

    maybe I am naive but wouldn’t owncloud generally control permissions?



    (2) a subfolder called /dev/sdb2/backup/back_in_time/ for using an application called back in time to act as an automated backup of important files on that computer.


    again, thank you for your time
    Qu1nn...
    Pentium D 820, 2.80GHz, Intel D945PSN ATX, PowerColor Radeon HD7870, Geil DDR2, (1GB x 2) Dual Channel 667MHz Suse 13.2, KDE
    Haswell i4771, 3.5GHz, Asus Z87-WS ATX, Club3d R9 280X RoyalQueen, Corsair 8GBx2, Corsair AX860 PS, openSuse 13.1, KDE

  7. #7
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    29,788

    Default Re: additional hard drive - su can only write

    You can not use it like that. /dev/sdb2 et al are device special files, notdirtors where you can cre file/sub-dirctories. These device special files represent the file systems. File systems must be mounted somewhere in your directory tree to mmk the directriees/files n them aivalable.

    Maybe this can help you: http://en.opensuse.org/SDB%3ABasics_...,_mount_points
    Henk van Velden

  8. #8

    Default Re: additional hard drive - su can only write

    maybe there is confusion in my setup:
    http://picpaste.com/584294509255193d...52e5fc71ce.png

    sdb2 is formatted as ext4.... thus just file space....

    I have already did the chmod 1777 > created the directories, dumped some files

    Seems to be working fine.
    I can log into owncloud and see the files created ....
    I can also use dolphin / webdavs to see the files


    unless I am missing something...
    I have some more testing to do though... but that will have to be tomorrow...


    qu1nn
    Pentium D 820, 2.80GHz, Intel D945PSN ATX, PowerColor Radeon HD7870, Geil DDR2, (1GB x 2) Dual Channel 667MHz Suse 13.2, KDE
    Haswell i4771, 3.5GHz, Asus Z87-WS ATX, Club3d R9 280X RoyalQueen, Corsair 8GBx2, Corsair AX860 PS, openSuse 13.1, KDE

  9. #9

    Default Re: additional hard drive - su can only write

    Quote Originally Posted by qu1nn View Post
    I was planning on using dev/sdb2 for the following:
    (1) a subfolder called /dev/sdb2/backup/share for expanding the local external storage in owncloud.
    I'm not familiar with owncloud, but unless it's doing something really weird, your disk /dev/sdb2 is mounted as the DIRECTORY '/backup', just as /dev/sda1 is mounted as '/' (the root directory), /dev/sda2 is mounted as '/home', and so on. So you could make subdirectories called 'share' &c under that...

Posting Permissions

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