Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 25

Thread: permit a general user to access all directories in ubuntu 12.04

  1. #11
    Join Date
    Nov 2007
    Location
    London, England
    Beans
    5,578
    Distro
    Xubuntu 14.10 Utopic Unicorn

    Re: permit a general user to access all directories in ubuntu 12.04

    uzumakifahim: Can we go back to basics here - why do you want to give this user access to directories outside of his home? They will have read access to pretty-much everything anyway. And I can't think why you would want to give them write access outside of their home. I'm thinking maybe there is some misunderstanding, and that you simply think they need this access for something when in fact they don't.

  2. #12
    Join Date
    Jul 2012
    Location
    Dhaka
    Beans
    264
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: permit a general user to access all directories in ubuntu 12.04

    Actually the users are using Windows 7 now. They are using a general user account and they has read-write permission on the local hard drives. But they can't install or remove software. I am looking for same user privilege with Ubuntu 12.04.

    Hope now it's clear to everybody that what I want actually.

    Thanks to all.

  3. #13
    Join Date
    Feb 2008
    Beans
    4,300
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: permit a general user to access all directories in ubuntu 12.04

    When you say "access," do you mean you want the person to be able to read/copy files from all folders? In order to edit or add files, the users needs administrative privileges.

  4. #14
    Join Date
    Jul 2012
    Location
    Dhaka
    Beans
    264
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: permit a general user to access all directories in ubuntu 12.04

    @gordintoronto, I've mentioned in my last post that I want a user will be able to read and write files in local hard drives., but he can't be able to install or remove a software that affects all users. This is possible in Windows 7 (a general user can read and write files on drive, like C, D, E etc., but he can't install or remove any software).

    I want to replace windows 7 with Ubuntu 12.04. That's why I need this in Ubuntu 12.04.

  5. #15
    Join Date
    Aug 2011
    Location
    52° N 6° E
    Beans
    2,641
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: permit a general user to access all directories in ubuntu 12.04

    You can just make a general data storage directory somewhere on your system, where every user has full read and write access.

  6. #16
    Join Date
    Jul 2012
    Location
    Dhaka
    Beans
    264
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: permit a general user to access all directories in ubuntu 12.04

    How can I do that with my existing partition?

  7. #17
    Join Date
    Aug 2011
    Location
    52° N 6° E
    Beans
    2,641
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: permit a general user to access all directories in ubuntu 12.04

    In /media or wherever you like you can make a directory where you can mount your data partitions. Use /etc/fstab to mount them.
    https://help.ubuntu.com/community/Fstab

    If you want to give users access to the root partition for data storage (a less elegant solution, but it works), you can just make a directory. For example call this directory /media/bar/. To make it accessable to all the easiest way is probably to create a group for all people who are allowed to use the general storage. Let's call this group foo. See further:
    http://manpages.ubuntu.com/manpages/...roupadd.8.html -- create a group
    http://manpages.ubuntu.com/manpages/...5/group.5.html -- add users to a group
    I'm sure there's also a GUI way.

    By default all files are created with read and write permissions for the group to which they belong (because by default your umask is 0002, blocking only write permission for others). This means that you have to make sure all files in /media/bar belong to group foo, which can be arranged with the set group ID bit on the directory.
    Code:
    #Create directory
    sudo mkdir /media/bar
    #Set group of directory
    sudo chgrp foo /media/bar
    #Set permissions
    sudo chmod 2776 /media/bar
    New files created in this directory or copied to it will have the correct group and permissions. If someone moves an entire directory to this general data directory this may not be the case, but a recursive chgrp and chmod can fix this quickly.

    Note that groups are also a useful way of giving certain people write access to particular system directory, so that you can make a user the admin for a data directory of one particular application.

  8. #18
    Join Date
    Feb 2013
    Beans
    Hidden!

    Re: permit a general user to access all directories in ubuntu 12.04

    Quote Originally Posted by uzumakifahim View Post
    Actually the users are using Windows 7 now. They are using a general user account and they has read-write permission on the local hard drives. But they can't install or remove software. I am looking for same user privilege with Ubuntu 12.04.
    Maybe I'm misunderstanding who general users are. But: I have three user accounts on my Windows 7 machine. Only one of them, who's in the group Administrators, can install/remove software. And only this user can write to C:\. The other two can't. So, I doubt a general user has full write access to local hard drives even on Windows 7. Sure, you can grant them that right for specific folder outside of C:\Users by changing Properties of that folder. The Linux equivalent of it is to set up group permissions as Impavidius suggested.

    Perhaps it would be more helpful if you created a test user on your Ubuntu installation, logged in as that user, and tried all the actions you think such user should be able to do, then posted here what hadn't worked.
    Last edited by schragge; March 4th, 2013 at 11:20 AM.

  9. #19
    Join Date
    Jul 2012
    Location
    Dhaka
    Beans
    264
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: permit a general user to access all directories in ubuntu 12.04

    @schragge, thanks that you understand what exactly I want, but unfortunately your solution is not working yet.

    I have created a group named "impavidius", and assign a test user to that group, but after logging in that user is not able to open any local drives without administrator password.

  10. #20
    Join Date
    Feb 2013
    Beans
    Hidden!

    Re: permit a general user to access all directories in ubuntu 12.04

    Then we need more info about your configuration. How are your disk partitions laid out? Are all drives mounted on boot? What groups is your test user member of? Please post the output of following commands:
    Code:
    lsblk -o name,fstype,mountpoint,owner,group,mode,ro,rm,rota,size,state
    blkid -c /dev/null
    mount
    findmnt -s
    groups testuser
    where testuser is the username of your test user.

Page 2 of 3 FirstFirst 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
  •