Page 1 of 3 123 LastLast
Results 1 to 10 of 23

Thread: set user permission for share

  1. #1
    Join Date
    Oct 2008
    Beans
    8

    set user permission for share

    hi all,
    i just install ubuntu desktop.the installation create an user that will write "sudo" before all commands.
    But when i use "sudo mount" command,to mount a windows share on ubuntu,i can access to this share only with root user (sudo su) and i can't access with current user.
    I always used root when using linux, so i have no experience with sudo comand and user permission.
    Can you tell me where i must add/change permission to give access to current user to that share?
    Thx

  2. #2
    Join Date
    Jun 2008
    Location
    Colombia
    Beans
    443

    Re: set user permission for share

    First find out your uid and gid with the command

    Code:
    id
    Then run this

    Code:
    sudo mkdir -p /media/mydisk
    sudo mount -o uid=1000,gid=1000 /dev/sdb1 /media/mydisk
    But change uid and gid and the device to adjust to your needs.
    Last edited by Sarmacid; October 22nd, 2008 at 02:19 PM.

  3. #3
    Join Date
    May 2008
    Location
    Australia
    Beans
    173
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: set user permission for share

    sudo is the only excepted way, but you can search for a way to change the permission of the directory/drive or file with the chmod command I try to find the right command hold on a sec.
    Ubuntu Hardy Heron 8.04 64 LTS With Sugar On Top.

    Do U Boot Too, I U Boot Too, We All Ubuntu because I Ubuntu, If only life was this interesting.

  4. #4
    Join Date
    May 2008
    Location
    Australia
    Beans
    173
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: set user permission for share

    sudo chmod 777 (the directory of file you need to change permission) in this case your windows share. by they way is this on a network or just on a drive, sorry got a head of my self should of asked first.
    Ubuntu Hardy Heron 8.04 64 LTS With Sugar On Top.

    Do U Boot Too, I U Boot Too, We All Ubuntu because I Ubuntu, If only life was this interesting.

  5. #5
    Join Date
    Oct 2008
    Beans
    8

    Re: set user permission for share

    maybe i wrong explain,i write an example of what i done
    ------------------------------------------------
    $sudo mount -t cifs //"server_windows"/common -o username="windows_user",password="password" /mnt/common
    $cd /mnt/common
    -bash: cd: /mnt/common: Permission denied
    $sudo su
    #cd /mnt/common
    /mnt/common#ls
    pippo
    pluto
    newfolder
    /mnt/common#
    ------------------------------------------------------
    but i want enter in that folder as current user not root
    what have to do?

  6. #6
    Join Date
    May 2008
    Location
    Australia
    Beans
    173
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: set user permission for share

    I know i am repeating my self but i am not trying to be rude is it on a local drive or network drive?
    Ubuntu Hardy Heron 8.04 64 LTS With Sugar On Top.

    Do U Boot Too, I U Boot Too, We All Ubuntu because I Ubuntu, If only life was this interesting.

  7. #7
    Join Date
    Oct 2008
    Beans
    8

    Re: set user permission for share

    sorry
    is a windows network drive

  8. #8
    Join Date
    May 2008
    Location
    Australia
    Beans
    173
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: set user permission for share

    sorry to ask so many questions just trying to deduct any possibilities that would hinder your access.

    have you given permission on the networked computer you wish to access to allow other computers to access it, also check if you have a anti virus software that includes its own fire wall, this will also prevent you from access. try to edit its network IP setting to allow the desired machine to gain access or simply switch it off until you get what you need.
    Ubuntu Hardy Heron 8.04 64 LTS With Sugar On Top.

    Do U Boot Too, I U Boot Too, We All Ubuntu because I Ubuntu, If only life was this interesting.

  9. #9
    Join Date
    Dec 2007
    Location
    Science Station Hermes
    Beans
    611
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: set user permission for share

    If your only problem is that you can't cd into the directory, run

    Code:
    sudo chmod a+rx /mnt/common
    this will give all users execute (cd into) and read access to the folder.

    Are you wanting this share auto- or perma-mounted? If you just browse the share from time to time you can type smb://xxx.xxx.xxx.xxx in the nautilus address bar.
    Last edited by alphaniner; October 22nd, 2008 at 03:03 PM.
    Quote Originally Posted by Legendary_Bibo View Post
    I tried, and by tried I mean I did a half a**ed google search, and by half a**ed google search I mean I typed "eread pdg"

  10. #10
    Join Date
    Oct 2008
    Beans
    8

    Re: set user permission for share

    ............maybe write something wrong or else but i have no problem to access to this windows share
    i only want that a normal ubuntu user can access to this folder mounted, as root do
    why as user i can mount a share but not have access to this,and i must become root to access? is a linux internal permission problem. why i can't mount a share directly with my user without use "sudo"?

    alphaniner i do
    sudo chmod a+x /mnt/common
    and also
    chown user /mnt/common

    but still i can't access to this folder as ubuntu user but only with ubuntu root

Page 1 of 3 123 LastLast

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
  •