SMB Share Root Directory Creation

Status
Not open for further replies.

cadamwil

Explorer
Joined
Sep 6, 2013
Messages
60
Hello All,
I have had a Freenas box for a while now, and I don't think I had this issue until recently. I cannot seem to create a directory in the root of my SMB Share. I am sure it is a permissions issue, but best I can see, the permissions are correct. My user is the owner of the files and I have my user set as the guest account. My only thing is I do have the permissions set to Unix, because I didn't want any issues with any plugins or anything else. Any suggestions would be greatly appreciated.

Adam
 

Attachments

  • FreenasSMBAdvanced1.jpg
    FreenasSMBAdvanced1.jpg
    53.8 KB · Views: 305
  • FreenasSMBAdvanced2.jpg
    FreenasSMBAdvanced2.jpg
    58.5 KB · Views: 270
  • FreenasStoragePermissions.jpg
    FreenasStoragePermissions.jpg
    49.3 KB · Views: 256

Nick2253

Wizard
Joined
Apr 21, 2014
Messages
1,633
The issue you are seeing is because you are sharing the root dataset. However, you shouldn't be sharing the root dataset; that is not a supported configuration. You probably got to this point because, in previous versions, this configuration was allowed (but again, it's never been a supported or recommended configuration).

You should create a sub dataset (for example, called "Share"), and share that dataset. It should be pretty straight forward to make the move, but if you have files already in the root dataset, you may need to jump into the command line to move those into the newly created dataset. Then you can just change the path in the share, and everything should work.
 

cadamwil

Explorer
Joined
Sep 6, 2013
Messages
60
The issue you are seeing is because you are sharing the root dataset. However, you shouldn't be sharing the root dataset; that is not a supported configuration. You probably got to this point because, in previous versions, this configuration was allowed (but again, it's never been a supported or recommended configuration).

You should create a sub dataset (for example, called "Share"), and share that dataset. It should be pretty straight forward to make the move, but if you have files already in the root dataset, you may need to jump into the command line to move those into the newly created dataset. Then you can just change the path in the share, and everything should work.
Nick,
So creating a subfolder in the dataset and sharing that folder isn't the same, correct? I need to create a sub-dataset like jails and then share that?
 

Attachments

  • FreenasStorageVolumes.jpg
    FreenasStorageVolumes.jpg
    86.9 KB · Views: 300

Nick2253

Wizard
Joined
Apr 21, 2014
Messages
1,633
Nick,
So creating a subfolder in the dataset and sharing that folder isn't the same, correct? I need to create a sub-dataset like jails and then share that?
That is correct.
 

cadamwil

Explorer
Joined
Sep 6, 2013
Messages
60
So, Something isn't right, when I created the Sub Dataset and try to move directories to it from the Root, stuff fails to copy with "Operation not permitted" I have checked the permissions and they, as far as I can tell are identical. Any help would be greatly appriciated. I am all for making my setup more ideal, but so far it is breaking stuff. When I moved the data to a new directory in the ZFS2 dataset, it worked perfectly. Some stuff moves, but most fails.

Something to keep in mind is I know very little about Unix/Linux, so it may be something simple.
 
Last edited:

cadamwil

Explorer
Joined
Sep 6, 2013
Messages
60
So, this morning I tried the mv logged in as myself, since I am the owner, and it failed just like with root. Ideas?
 

Nick2253

Wizard
Joined
Apr 21, 2014
Messages
1,633
First, it's really helpful, especially if you know very little, to provide the exact commands you are running, and the exact output you are getting. Use "code" tags when posting here to make it more legible. I have see that, more often than not, the issue is with the command being run, not the underlying system.

I would first try using cp to copy your data over. The mv command could be failing because of something else related to how it deletes the files. Try copying a couple files at first and see what happens.
 

cadamwil

Explorer
Joined
Sep 6, 2013
Messages
60
Nick,
Sorry to keep bugging,
Code:
cp
did copy the directories and then I used
Code:
rm -r %Directory%
to remove them. Would something like
Code:
rsync -ah --progress %SourceDir% %DestinationDir%
work better, or at least as well and allow me to see what is going on?
 

Nick2253

Wizard
Joined
Apr 21, 2014
Messages
1,633
I personally would just do cp/rm, but you could just as easily use rsync/rm. The advantage to rsync is that, with the right flags, you can get an exact copy, and not have to worry about partial transfers or errors. When I'm doing stuff like this, my automatic response is just cp, and I usually only use rsync in scripts or transfers across a network where there is a good chance of network dropout.
 
Status
Not open for further replies.
Top