Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: [SOLVED] Folder sharing problem

  1. #1
    Join Date
    Oct 2008
    Location
    Columbus, Ohio, USA
    Beans
    Hidden!
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    [SOLVED] Folder sharing problem

    I'm trying to share a folder, to all users of Ubuntu on this desktop machine, in /home. 'root' is the current "owner" of this folder.

    This is the machine:
    • AMD64 Processor
    • OS is Ubuntu 8.04.1
    • /home (own separate partition) filesystem is reiserfs
    • It's a dual-boot machine with WinxP


    When I typed "shares-admin" in Terminal, the following warning displayed:

    Code:
    (shares-admin:9073): Gtk-WARNING **: Unknown property: GtkComboBox.items
    The first time this warning occurred, an option box said I needed file-sharing applications installed and gave two options [NFS(unix) and SMB(windows)] and so I had both installed.

    The second time the warning appeared but the "Shared Folders" dialog did open. I selected "add folder", selected the folder to share, unchecked "read only" and clicked "share".

    When I open /home in Nautilus, I can only view and copy the contents. I would like the contents to be viewable/editable/deletable for myself and one other user. Can someone help me share the folder and understand the warning? If someone could help me understand how it's determined who gets the permissions, that would be helpful.

    If there is a way I can do this in Terminal (using chown?), that would be fine, I like to learn new stuff and how to have more control over stuff. I've read the results of:

    Code:
    info chown
    and I still not comfortable doing it myself.

    Thanks!
    Last edited by boof1988; October 29th, 2008 at 04:30 PM. Reason: Added blue text for clarity?

  2. #2
    Join Date
    Jul 2006
    Beans
    145
    Distro
    Ubuntu Development Release

    Re: Folder sharing problem

    Are you trying to share /home/yman, or /home/yman/public?
    (the above directory paths are examples)

    Are you trying to share it with another user on the same system, across the network, or with the WinXP system that's on the same machine?

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

    Re: Folder sharing problem

    Using ls -al will show you the permissions the user, group, and everybody else has over that file/directory in that order. To change those permissions, you can use chmod. If you have more users, I'd suggest creating a group, add the 2 users you want sharing the folder, give full permissions to those users and none for everybody else.

  4. #4
    Join Date
    Oct 2008
    Location
    Columbus, Ohio, USA
    Beans
    Hidden!
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: Folder sharing problem

    Quote Originally Posted by yman View Post
    Are you trying to share /home/yman, or /home/yman/public?
    (the above directory paths are examples)
    I'm trying to share (sharedfolder) /home/sharedfolder. Aha... Do I have to be logged in as 'root' or use sudo/gksudo to share this folder?

    Quote Originally Posted by yman View Post
    Are you trying to share it with another user on the same system, across the network, or with the WinXP system that's on the same machine?
    Eventually I want to share it on my home network, for now I just want to share it with both users on the same system (computer).

    Thanks for the questions. I tried to clarify in the OP.

  5. #5
    Join Date
    Jun 2008
    Location
    UK
    Beans
    1,063

    Re: Folder sharing problem

    The way you are trying to do it is setting up a share on a network hence the samba warning.
    The quickest way is the chmod command:

    Code:
    sudo chmod a+rw fileName
    This allows read and write access to all users

    a = all
    u = user
    g = group
    o = other

    + = add privilege
    - = remove privilege

    r = read
    w = write
    x = execute

    more information on chmod can be found by using
    Code:
    man chmod
    Code:
    ls -l
    will list all file/folders and there permsions

    I beleve you can also right click and change this in propeties

    the command chown will change ownership
    Code:
    man chown
    For more details

    Hope this helps

  6. #6
    Join Date
    Oct 2008
    Location
    Columbus, Ohio, USA
    Beans
    Hidden!
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: Folder sharing problem

    Quote Originally Posted by Sarmacid View Post
    Using ls -al will show you the permissions the user, group, and everybody else has over that file/directory in that order. To change those permissions, you can use chmod. If you have more users, I'd suggest creating a group, add the 2 users you want sharing the folder, give full permissions to those users and none for everybody else.
    Here's the results of <ls -al>:

    Code:
    bs@kpdesktop:/home$ ls -al
    total 2
    drwxr-xr-x  6 root root  128 2008-10-27 20:04 .
    drwxr-xr-x 23 root root  704 2008-10-29 07:05 ..
    drwxr-xr-x 34 bs   bs   1456 2008-10-29 11:23 bs
    drwxr-xr-x  3 root root   80 2008-10-27 20:04 sharekpd
    I am bs and I want 'sharekpd' to have unlimited access to myself and one other user yet to be created.

    I created a group (gpsharekpd) and added myself to it. The other user is not created yet.

    Will create the other user and report back. I need to look up (or you could tell me) how to use chmod to change permissions.

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

    Re: Folder sharing problem

    Based on tarps87's post:

    Code:
    sudo chmod -R a+w sharekpd
    Will give users in the group writing permissions, wich is what you're missing
    Code:
    d|rwx|r-x|r-x
    That means it's a directory, readable/writable/executable by your user, readable/executable by the group, readable/executable by everyone else.

  8. #8
    Join Date
    Jun 2008
    Location
    UK
    Beans
    1,063

    Re: Folder sharing problem

    Quick explination of the output of ls -al
    drwxr-xr-x
    d = directory
    next there are three set of three:
    rwxr-xr-x
    1st three = user
    2nd three = group
    3rd three = other

    r = read
    w = write
    x = execute

    If the folder is owned by root you will need to use sudo, if it is owned or you have write access you do not need to use sudo

    root root are the owner and group in that order
    for you home folder bs
    drwxr-xr-x 34 bs bs 1456 2008-10-29 11:23 bs
    you are the owner and it is in the group bs also only you have write access
    Last edited by tarps87; October 29th, 2008 at 04:54 PM.

  9. #9
    Join Date
    Jul 2006
    Beans
    145
    Distro
    Ubuntu Development Release

    Re: Folder sharing problem

    Quote Originally Posted by boof1988 View Post
    I'm trying to share (sharedfolder) /home/sharedfolder. Aha... Do I have to be logged in as 'root' or use sudo/gksudo to share this folder?
    Yes.

    However, I think you fail to understand the purpose and proper use of /home. I wrote a long reply but my college's annoying authentication system caused it all to get lost.

    /home holds the personal home folders of all users on the system. A home folder is where a user stores personal files and settings. To create a home folder manually just in order to share some files doesn't sound like following best practices to me. Perhaps it would be better to create a folder inside your home folder and use that for sharing? This could for instance be the folder Public, so then you'd be sharing /home/boof1988/Public.

    EDIT: /home = C:\Documents and Settings
    /home/yman = C:\Documents and Settings\yman
    /root = C:\Documents and Settings\Administrator (I think)

    Eventually I want to share it on my home network, for now I just want to share it with both users on the same system (computer).

    Thanks for the questions. I tried to clarify in the OP.
    Sharing over the network (presumably with Windows computers) isn't the same as sharing with other users of the same system. To share with other users on the same system, create a group and give that group read and write access to the folder you want to share. To share over the network right-click on the folder, select "Sharing Options" from the context menu, and choose the options that suit you.
    Last edited by yman; October 29th, 2008 at 05:07 PM.

  10. #10
    Join Date
    Oct 2008
    Location
    Columbus, Ohio, USA
    Beans
    Hidden!
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: Folder sharing problem

    Quote Originally Posted by Sarmacid View Post
    Based on tarps87's post:

    Code:
    sudo chmod -R a+w sharekpd
    Will give users in the group writing permissions, wich is what you're missing
    I did that and now sharekpd is rwxrwxrwx. Sweet! There wont be any 'other' users on the computer so the rwx for "other" is fine. I'll log on as the other user and make sure they have access (they should).

    Quote Originally Posted by Sarmacid View Post
    Code:
    d|rwx|r-x|r-x
    That means it's a directory, readable/writable/executable by your user, readable/executable by the group, readable/executable by everyone else.
    Thanks to Sarmacid and tarps87 for the help and explanations.

    I'll try and figure out if I can remove the rwx for 'other users'.

    Here's some popcorn...



    and a gold star...



    Off-Topic...
    "tarps" stands (in Naval Air lingo) for Tactical Air Reconnaissance Pod System

Page 1 of 2 12 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
  •