Results 1 to 9 of 9

Thread: added second hard drive now cant chown or chmod

  1. #1

    Default added second hard drive now cant chown or chmod

    I occasionally get into areas in Linux where I get my own ignorance demonstrated....

    System is a core quad running OpenSuse 11.2 64 bit on a LAN at home. I added a 750 GB SATA drive with the idea of putting all media on the drive i.e.music primarily plus a few movies and making the data sharable by anyone across the LAN i.e. the computer in the living room with an audio line to the stereo. My room mate is strictly a Windoze user so I figured if she wanted stuff on her machine as well then format the new drive with NTFS which I did using GPartd. I then set the drive to mount as /storage under root.

    I loaded the music library &c and although I can play music from my user account on this machine I can not add music or videos or anything else except as root. I dont want to have to change to /root to do this.

    I attempted a chmod tonight as su from a terminal then in the root GUI using dolphin and resetting the permissions under properties and nothing changes. The drive appears in the filesystem as /storage with ownership as root. The permissions are

    drwxr-xr-x 1 root users 4096 2010-03-27 22:55 storage


    trying to chmod as root has no effect at all. I would like to be able to add content from any machine on the LAN plus be able to play a movie or video as well as music (I assume this would need the execute permission) but chmod -R 777 storage has no effect. Neither does cd'ing to the directory and trying to change ownership or permissions on the individual files or directories on the drive.Command line as su or as root from that gui, no difference. I do a

    chmod g+w,o+rw storage

    and the command appears to execute.However I ls -l and find the permissions unchanged. I obviously have or am doing something wrong, possibly in the way I set the drive up in the first place. Any help or suggestions would be deeply appreciated.

    Regards
    Carr

  2. #2
    Join Date
    Mar 2008
    Location
    Oz
    Posts
    11,727
    Blog Entries
    2

    Default Re: added second hard drive now cant chown or chmod

    You can't chmod or chown an NTFS drive. You have to make the assignment in the mount command.

    See here: HowTo Mount NTFS Filesystem Partition Read Write Access in openSUSE
    Leap 42.3 & 15.1(Beta) &KDE
    FYIs from the days of yore

  3. #3

    Default Re: added second hard drive now cant chown or chmod

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    NTFS doesn't know anything about posix permissions and you will not be
    able to apply permissions to it using chmod. You can, however, set
    permissions for everything in there when you mount it using the options of
    the mount command. See how it is currently setup by running `mount` and
    then check the manpage (or other posters' comments) to see how to set the
    options when it is mounted so that a user can write in there, or anybody
    can write in there.

    Google also found this: http://linux.die.net/man/8/mount.ntfs-3g

    Good luck.





    On 03/29/2010 10:46 PM, expat1 wrote:
    >
    > I occasionally get into areas in Linux where I get my own ignorance
    > demonstrated....
    >
    > System is a core quad running OpenSuse 11.2 64 bit on a LAN at home. I
    > added a 750 GB SATA drive with the idea of putting all media on the
    > drive i.e.music primarily plus a few movies and making the data sharable
    > by anyone across the LAN i.e. the computer in the living room with an
    > audio line to the stereo. My room mate is strictly a Windoze user so I
    > figured if she wanted stuff on her machine as well then format the new
    > drive with NTFS which I did using GPartd. I then set the drive to mount
    > as /storage under root.
    >
    > I loaded the music library &c and although I can play music from my
    > user account on this machine I can not add music or videos or anything
    > else except as root. I dont want to have to change to /root to do this.
    >
    >
    > I attempted a chmod tonight as su from a terminal then in the root GUI
    > using dolphin and resetting the permissions under properties and nothing
    > changes. The drive appears in the filesystem as /storage with ownership
    > as root. The permissions are
    >
    > drwxr-xr-x 1 root users 4096 2010-03-27 22:55 storage
    >
    >
    > trying to chmod as root has no effect at all. I would like to be able
    > to add content from any machine on the LAN plus be able to play a movie
    > or video as well as music (I assume this would need the execute
    > permission) but chmod -R 777 storage has no effect. Neither does cd'ing
    > to the directory and trying to change ownership or permissions on the
    > individual files or directories on the drive.Command line as su or as
    > root from that gui, no difference. I do a
    >
    > chmod g+w,o+rw storage
    >
    > and the command appears to execute.However I ls -l and find the
    > permissions unchanged. I obviously have or am doing something wrong,
    > possibly in the way I set the drive up in the first place. Any help or
    > suggestions would be deeply appreciated.
    >
    > Regards
    > Carr
    >
    >

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v2.0.12 (GNU/Linux)
    Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

    iQIcBAEBAgAGBQJLsYpDAAoJEF+XTK08PnB5WJYQAMt6dKH9bwZgLpyhF84vqa2o
    64cTTt4SZGoE7o441nrqyS6X9SvmoOEp9TDUTcifCZsnoloFhWYf9SNgGpR91gne
    nr/ZMp2t3j8XtqC6im4fcdTN5yGnOWqm+pMVFAj7AZaLiSpLhJ6kSqHWXf6FsHNR
    hXR98dGHCKVQb6fYku30XEFK8ollgB5pRsb9DBaVWvBuyxzFRLs7/uz393z6TWYM
    OTKQIQLa5ntsamdtcU2B80lLSYuimX5J4DY6waAA1x938wWxjMUHVC2nT3YkGC7/
    ueIiG9W94gcuEFJQlLIHiddHQPbFLd+6qUh4O2p6EirrWqm6oVy3pcbMih+85uTj
    +WfWNwyGOHuYazb2ii+LDI6WMwdIBYM9120hrRYhjlay9jwfByFt6oUWTU5LdphZ
    ezv2yy+9id1Ui2TogjxO+U/YIPM9/VC/y6B+v2GSmEK5gw2F8JgL4wUU9kt7duJP
    WuZHtY+qYgNcyTfjPDZD3RoZk+mAhDEai6Ek04Z/r3IHSQQxV7tkLaKBO2wFNKeb
    N35SV82skm9NQ4DS+gm83GRN0g6v5maEbGz378XxCsUqtbqyWizSCW0aqXO14MlW
    6hhnKM7BfxUjstbAMFktSGugXC39WmIUdyEVBp7/8liyRY9yab5V9NcBNLkNupaU
    IoHX8un0cEcLICTzLjHb
    =Ou3w
    -----END PGP SIGNATURE-----

  4. #4
    Join Date
    Mar 2008
    Location
    Oz
    Posts
    11,727
    Blog Entries
    2

    Default Re: added second hard drive now cant chown or chmod

    Afterthought: if you want to share to windows and make the share writeable to the roommate, try this mount syntax in fstab:
    Suppose your username is anthony
    Code:
    /dev/sdb1    /path_to/shared_directory    ntfs-3g    uid=anthony,gid=users,umask=0000    0 0
    That will make the permissions drwxrwxrwx and the owner to anthony and the group to users.
    and make a Samba share by putting this syntax in the file smb.conf:
    Code:
    [ShareName]
    path = /path_to/shared_directory
    read only = no
    guest ok = yes
    force user = anthony
    It will be world writeable over the LAN.

    FFI on Samba: Samba and Suse: HowTo Set up an openSUSE-Windows Home Office LAN/Network. Versions 11.x
    FFI on that share: Samba Server and Suse / openSUSE: HowTo Configure a Professional File Server on a SOHO LAN
    Last edited by swerdna; 29-Mar-2010 at 22:32.
    Leap 42.3 & 15.1(Beta) &KDE
    FYIs from the days of yore

  5. #5

    Default Re: added second hard drive now cant chown or chmod

    Swerdna

    Thanks very much for the information, the posts and the links. I was under the mistaken impression that NTFS had a permission structure similar to ext3, and that mounting and permissions were separate.

    In any case many thinks. With the exception of a few glitches my first experience in 64 bit has been excellent...and the help available here as well. My own ignorance is sometimes overwhelming.

    Warmest Regards
    Carr

  6. #6
    Join Date
    Mar 2008
    Location
    Oz
    Posts
    11,727
    Blog Entries
    2

    Default Re: added second hard drive now cant chown or chmod

    Quote Originally Posted by expat1 View Post
    Swerdna

    Thanks very much for the information, the posts and the links. I was under the mistaken impression that NTFS had a permission structure similar to ext3, and that mounting and permissions were separate.

    In any case many thinks. With the exception of a few glitches my first experience in 64 bit has been excellent...and the help available here as well. My own ignorance is sometimes overwhelming.

    Warmest Regards
    Carr
    It's great that you're having such a positive experience. And ignorance in Linux is fairly quickly cured by time.
    Leap 42.3 & 15.1(Beta) &KDE
    FYIs from the days of yore

  7. #7

    Default Re: added second hard drive now cant chown or chmod

    well that may be true.... but there is a LOT that I have to learn...

    I ve run various OpenSuse iterations starting out a few years ago on 10. This machine has been reassigned duties in my home/office and hobby shop, to doing the mail/browsing/chat and various web tasks. I day trade and replacing it is an I7 LGA 1366 EVGA motherboard based machine that will run the trading software. That unfortunately is only written for Windows. I ve tried running it under various virtualizations including Crossover, Virtual Box, Wine &c to no success. The I7 has Windows 7 64 bit installed. I plan at some point to install OpenSuse 11.2 64 bit on it but cant get too carried away with playing since its how I make my living..... I tried SLED on this machine (had 11.2-32 bit on here before) thinking that SLED might have been a better choice for a machine used in a semi "production" environment.... but I didnt like SLED since it was not easily (for me ) customizable (is that really a word?) so ended up installing 11.2-64. So far in spite of a few glitches---primarily Thunderbird and Firefox....its been a good experience.

    The machine that this one replaced--a P4 with SUSe 11.2-32-- moved around the corner to run ham radio software (since I am a ham, KF4VAR) like logging programs, packet radio and some actual transceiver control. I moved back to the US from Mexico in December of last year after quite a number of years living there, due primarily to safety considerations. I've been out of the markets for a little over a year and the software I use now is multi processor threaded and 64 bit....plus I was looking for an excuse to build an I7 anyway A pair of SLI capable NVidia GTS 250's drive 4 22" Samsung monitors. Im pretty amazed at what the I 7 is capable of. When I moved back, my room mate and oldest friend had a spare room so I ended up building the furniture and shelves as well so this is pretty much the culmination of a 2 month long project that started with carpentry and ended up with SUSe 11.2-64 on the quad and an I 7 as well......

    I ve rattled on enough.


    Thanks very much again for the help, the interest and the and kind words.

    carr

  8. #8
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,149

    Default Re: added second hard drive now cant chown or chmod

    Quote Originally Posted by expat1 View Post
    Swerdna

    Thanks very much for the information, the posts and the links. I was under the mistaken impression that NTFS had a permission structure similar to ext3, and that mounting and permissions were separate.
    Normaly mounting and permission are seperate things. But because many people seem to have a need for using MS type file systems on their Linux, an implementationwas build. But that implementation can not of course make something like NTFS having things it does not have. So it has to simulate. And it simulates by taking file system dependent parameters on the mount telling what ownership etc. it should simulate. But this mechanism can not e.g. simulate some owner for part of the files and another owner for another part of the files.

    Conclusion: avoid non native file systems when possible.

    I e.g. made part of my USB memory sticks/cards having ext3 on their partitions.
    Henk van Velden

  9. #9
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: added second hard drive now cant chown or chmod

    And while we are on this, it's worth noting that FAT has no ownership info at all and rather rudimentary permission info. So the permissions when mounted on Linux are faked up from the mount parameters.

Posting Permissions

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