[solved]Create a dir but can't write files there

  • Greetings


    I have user steve with a share called /steve shared with SMB from OMV.


    From an Arch Linux client, I can see other dirs under /steve and create files and dirs under there like /steve/linux.


    However, I can not copy files to the subdir /steve/linux. I just get a permission error.


    Anyone have a quick tip on this?


    Thanks
    steve.

  • So you are logging in the samba share with just the user steve? You do everything in steve folder but not below the steve folder? In shared folders/privileges you gave user steve read/write access? How did you create subdirectory linux? Did you create it with steve user while connected with client to shared folder? If you have webmin installed you can use file browser to look at owner/group of the shared folder steve and subfolder linux. Tell me who the owner/group of those 2 folders are?

  • EDIT--> problem occurs only within a Linux client. Windows client allows me to freely create and add files beneath the OMV shared folder /steve. I would still like to be able to use a Linux client, but probably NFS is the right way to do it for speed but to have to get another protocol up is a hassle.




    So you are logging in the samba share with just the user steve? -->Yes.
    You do everything in steve folder but not below the steve folder? folder /steve is read/write fine. I can create subdirs under /steve but can not write to the subfolder. It is under the new subfolder that I want to put files but can not. The parent /steve folder is fine. The child folders are NOT.
    In shared folders/privileges you gave user steve read/write access? -->Yes.
    How did you create subdirectory linux? Did you create it with steve user while connected with client to shared folder? -->/steve/linux created from the linux client using smbclient. Also, can create other subdirs using XFCE file mgr Thunar. In each case, I can not create files under the new subdir.
    If you have webmin installed you can use file browser to look at owner/group of the shared folder steve and subfolder linux. Tell me who the owner/group of those 2 folders are? --> No webmin yet, but using the cli on the OMV host shows owner is steve and group is users. Are the owner group and other file permissions relevant? In the OMV gui, I did not configure group permissions, since I have only setup one user (to learn on).


    Great questions above by the way! In any case, what is the common procedure to develop a directory structure? I thought I could setup, using OMV gui, a shared folder for each user, like /steve, and then let the users, using a Win7 client say, develop their own way to organize files. Is this the right thinking?


    I think if the wiki had some info on how OMV might be setup under different, common, scenarios, it might be helpful. Hope I get to that stage of understanding.


    Thanks very much for your help.
    Steve.

  • When users are created in omv the default group is users. From what you say it sounds like you just want to give some users in the house a space to put stuff on the server? You said from cli that owner is steve and group is users. Is that for the linux folder? the steve folder? If the linux folder has steve:users as the owner:group you should be able to write to it using steve user. In my setup I usually create a folder with root in cli on a data disk. So the owner: group is root:users. Then I share that folder in omv and assign user privileges. I only give 1 user write perms. Say the user with write perms is user1. Anything that user1 writes to the samba share will have user1:users for owner:group. If your user has issues writing and the linux folder has steve:users as owners:group it is weird. Since the windows machines are writing OK I think it may be issue with the Linux machines. So you have other Linux machines that you are connecting to the samba share thru your LAN? And those machines have this issue? What are you running on them?

  • When users are created in omv the default group is users. From what you say it sounds like you just want to give some users in the house a space to put stuff on the server? --> yes.


    You said from click that owner is steve and group is users. Is that for the linux folder? --> the /steve folder and the /steve/linux folder are owner=steve group=users.


    the steve folder? If the linux folder has steve:users as the owner:group you should be able to write to it using steve user. --> I agree.


    In my setup I usually create a folder with root in cli on a data disk. So the owner: group is root:users. Then I share that folder in omv and assign user privileges. I only give 1 user write perms. Say the user with write perms is user1. Anything that user1 writes to the samba share will have user1:users for owner:group. If your user has issues writing and the linux folder has steve:users as owners:group it is weird. ---> i HEAR YOU!! WEIRD.


    About setting OMV shared folders up: Seems to me the easiest way is the just create the directory structure using the OMV cli. In my case, it might be /shared/steve, /shared/jill, /shared/molly. In OMV you would have users of steve,jill,molly, and you would just assign your OMV users to those folders, right? I know they want to keep their stuff separate so that is the reason for the jill and molly subdirs. Then your users could just setup any kind of folder structure under their assigned folder, right? Is that kinda what you were saying?


    Also, have you noticed an issue about deleting users? Should you be able to create a user and then delete it? If the user still has a share assigned then that would have to be deleted, but other than that kind of thing, the user should be able to be deleted, right?


    Thanks so much.
    Steve.

  • There are a million ways samba can be setup. The structure you use is dependent upon desired use. That said, many constraints are placed on samba design by omv. You need to have an idea of what designs omv is capable.

  • Zitat von "tekkbebe"

    There are a million ways samba can be setup. The structure you use is dependent upon desired use. That said, many constraints are placed on samba design by omv. You need to have an idea of what designs omv is capable.


    I realized there were necessary constraints imposed upon samba by OMV. I did not even try to look at the smb.conf or equiv file OMV maintains for that reason.


    Tks

  • I think the idea of having a main folder in the root of the data drive is a good idea. So structure like this:


    /shares/user1
    /shares/user2
    /shares/user3
    etc....


    Do a shared folder for each user. So the folder shares will be /path/user1, /path/user2, etc.... path being /media/uuid/shares/user1
    Have only 1 read/write user per shared folder so folder /user1 would give user user1 read/write privileges.
    Etc.....


    If you have an issue writing to one of the user folders and you notice any user:groups are messed you can just do this command:


    chown -R user1:users /media/uuid/shares/user1 (for issue with user1 share)


    Should fix any issues in user1. UUID is the drive number. You should be familiar with this by now.


    PS- yeah, that issue with deleting user is normal. Unfortunately there are several little issues like that and slowly you will become aware of others, and learn how to deal with them.

  • General NFS comment (maybe not OMV?):


    When creating a directory to share, be sure to set permissions for your clients.


    I know this seems like common sense, but a number online wiki or tutorials examples fail when clients access the share with a "Permission Denied error".


    It is my understanding that NFS can only LIMIT permissions, it can not increase permissions. An example might be a directory set up by root, like this:

    Code
    drwxr-xr-x  2 root root   4096 Dec  2 13:20 music


    but even if NFS shares it RW, it will only be read only to [all?] clients.


    Back to OMV now--> I need to see the permissions that the OMV software sets on a directory marked as shared.


    Comments anyone?


    Thanks
    Steve.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!