Results 1 to 11 of 11
  1. #1
    Joined
    Sep 2001
    Posts
    776

    RH 8.0 permissions on mounted network shares help

    Here's the thing that is tripping me up. I create a dir called "files" in /mnt and a group called "files" to which I add users. then I change the ownership on /mnt/files to root:files and mount a smb share on a windows 2K machine and the ownership changes to root:root on /mnt/files. How can I keep this from changing so that windows users will have write access. Guess I'm trying to do something like distributed file system in win2K through linux. I want to use DNS round robin on two or more linux machines that front for an internal network and protects the machines hidden within.

    Thanks....
    Closed Source, Closed Minds ---> Open Source, Open Minds

    MAIN RIG
    Booting: Fedora Core 3, WinXP Pro
    Motherboard - MSI KT6 LSR
    AMD 2500+ Barton @ 2800+ (Thermalright AX-7 HS)
    1 GB Crucial PC3200 DDR
    Radeon 9700Pro (Gigabyte Maya II) with Zalman ZM80A-HP

    Linux Servers: Alexandria, Cairo, Zanzibar, Madagascar

    Microsoft Test Servers: Bishop, Rook, Knight, Pawn
    (running atop virtual pc on xp machines)

  2. #2
    Joined
    Jan 2002
    Location
    Nashville, TN
    Age
    33
    Posts
    3,369
    If you are mounting it as root that is why the permissions change. In order for a normal user to mount a filesystem you should add an entry to /etc/fstab like this:
    /dev/<partionhere> /mnt/files <filesystem type, vfat for fat32> user, defaults 0 0
    i code therefore i am

  3. #3
    Joined
    Jan 2002
    Location
    Nashville, TN
    Age
    33
    Posts
    3,369
    Oh and if you don't want it to be mounted automaticly when you boot up, change the part that says "user,defaults" to "user,noauto"
    i code therefore i am

  4. #4
    Joined
    Sep 2001
    Posts
    776
    Hmmmmm... No way around that I suppose??

    On another note.. How do you assign more than one group/user permissions to a directory/file?

    Can I mount a directory within Linux at other locations such as

    mount /home/user1 /mnt/a
    mount /home/user1 /mnt/b
    mount /home/user1 /mnt/c

    with different permissions on each mount point below /mnt??

    I'm probably going to rtfm (Orielly Running Linux) some tonight.
    Closed Source, Closed Minds ---> Open Source, Open Minds

    MAIN RIG
    Booting: Fedora Core 3, WinXP Pro
    Motherboard - MSI KT6 LSR
    AMD 2500+ Barton @ 2800+ (Thermalright AX-7 HS)
    1 GB Crucial PC3200 DDR
    Radeon 9700Pro (Gigabyte Maya II) with Zalman ZM80A-HP

    Linux Servers: Alexandria, Cairo, Zanzibar, Madagascar

    Microsoft Test Servers: Bishop, Rook, Knight, Pawn
    (running atop virtual pc on xp machines)

  5. #5
    Joined
    Jan 2002
    Location
    Nashville, TN
    Age
    33
    Posts
    3,369
    Permissions are set according to who mounts it and only root can mount partitions that aren't in fstab marked as user.

    I think can make multiple entries for the same filesystem in there to different mount points. If you set "noauto" on all of them it should be safe, then you can use the command "mount /mnt/a" to mount it at /mnt/a or "mount /mnt/b" etc. I'm not sure what would happen if you mount one filesystem at two different points...
    i code therefore i am

  6. #6
    Joined
    Jan 2002
    Location
    Nashville, TN
    Age
    33
    Posts
    3,369
    For example, I have this line in my fstab:

    /dev/sda4 /zip vfat defaults,user 0 0
    for my zip drive. As root I can type "mount /zip" and it mouts the zip disk and these permissions are in place:

    drwxr--r-- 6 root root 16384 Dec 31 1969 zip
    When I mount it as the user I get these perms:

    drwxr--r-- 6 eggs eggs 16384 Dec 31 1969 zip
    i code therefore i am

  7. #7
    Joined
    Sep 2001
    Posts
    776


    Thanks Eggs. Obviously I have a lot of reading to do

    I almost had burnout going on with the last bout when I achieved my MCSE and CCNA. I'm getting ready to finish my work towards the current MCSE track but I know that I really need to know Linux also. Really enjoying it so far although the permission structure is going to take a little while before I can figure out how to use it in a useful way. Are UNIX permissions the same?
    Closed Source, Closed Minds ---> Open Source, Open Minds

    MAIN RIG
    Booting: Fedora Core 3, WinXP Pro
    Motherboard - MSI KT6 LSR
    AMD 2500+ Barton @ 2800+ (Thermalright AX-7 HS)
    1 GB Crucial PC3200 DDR
    Radeon 9700Pro (Gigabyte Maya II) with Zalman ZM80A-HP

    Linux Servers: Alexandria, Cairo, Zanzibar, Madagascar

    Microsoft Test Servers: Bishop, Rook, Knight, Pawn
    (running atop virtual pc on xp machines)

  8. #8
    Joined
    Jan 2002
    Location
    Nashville, TN
    Age
    33
    Posts
    3,369
    I know how it is to get burned out on reading stuff

    The permissions stuff is all set up for security reasons. Having been designed to model UNIX to a degree, linux is at its core a multiuser OS. As such, extra security is needed to protect users from each other as much from the outside world Say I mount my zip disk, I want only me to have write permisions. Otherwise anyone logged in remotely to my computer would be able to delete everything on it and that would be bad

    Obviously security like this can be a pain the butt sometimes, but its better in the long run
    i code therefore i am

  9. #9
    Joined
    Oct 2001
    Location
    Finland
    Posts
    1,096
    Originally posted by navin

    On another note.. How do you assign more than one group/user permissions to a directory/file?
    With Access Control Lists (ACLs). They aren't part of RHL8.0, but they are in the current beta version so you might get ACL support in 8.1.

  10. #10
    Joined
    Sep 2001
    Posts
    776
    Eggs

    Yeah, I'm just having a little bit of a time understanding the difference between the NT 4.0 (server primarily), Win2K (server primarily), and Novell server mentality and how it relates to Linux in a real world security sense. Is there a benefit to having user,group,other security model as opposed to ACLs as in the windows server model? As an example I am used to putting users into groups and giving those groups permissions to directories/files and network shares with the ability of one group being able to have read permissions while yet another write permissions and another add permissions. I'm having a hard time trying to figure out how I would have very large numbers of people managed with ease under Linux. I'm sure it's my shortcoming in that I don't GET IT yet.

    markkuk

    I thought I remembered reading about ACLs for Linux but wasn't sure where it stood at this time. This would be a great help in the migration of windows servers to Linux in the future. When I started learning Linux I had to come from my windows server experience and it was pretty darn difficult at first. Aside from the the network protocols (no big deal) the file system and management was pretty close to a do over from what I knew.
    Closed Source, Closed Minds ---> Open Source, Open Minds

    MAIN RIG
    Booting: Fedora Core 3, WinXP Pro
    Motherboard - MSI KT6 LSR
    AMD 2500+ Barton @ 2800+ (Thermalright AX-7 HS)
    1 GB Crucial PC3200 DDR
    Radeon 9700Pro (Gigabyte Maya II) with Zalman ZM80A-HP

    Linux Servers: Alexandria, Cairo, Zanzibar, Madagascar

    Microsoft Test Servers: Bishop, Rook, Knight, Pawn
    (running atop virtual pc on xp machines)

  11. #11
    Joined
    Oct 2001
    Location
    Finland
    Posts
    1,096
    I've seen a claim that (in theory) you can do everything that you can do with ACLs by using the basic user/group scheme. I believe the solution involves creating a group for every unique combination of access rights. ACLs just make management simpler. See http://acl.bestbits.at/ for more info on ACLs on Linux (especially the "known problems and bugs" page).

Posting Permissions

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