two shares, one read-only

Status
Not open for further replies.

nojohnny101

Wizard
Joined
Dec 3, 2015
Messages
1,477
Hello,
Just a quick theoretical question. I have read many times on there how it is a big NO NO to have two shares access the same dataset.

But could I have one dataset and turn on read/write permissions for a CIFS to access it and also a SFTP share to access that same dataset but make it only read-only?

I know when two shares access the same dataset it can cause lockout and permission problems but wouldn't this be eliminated if one share method (in this case SFTP) is made to be read-only?

Thanks for your help guys!
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
....there is no such thing as an "SFTP share".

?
 

nojohnny101

Wizard
Joined
Dec 3, 2015
Messages
1,477
Hello,
Oh sorry. Under the services there is a way to access files under "FTP". That is what I was referring to.

But clearly files can be changed and modified while access through FTP (with public key SSH). So is this danger if you are doing this on a dataset that is shard by CIFS also? I guess since FTP is not a "share" then logging in through FTP would give you access to all files on the pool. Correct?

Sorry for the confusion. It was late last night!
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
But clearly files can be changed and modified while access through FTP (with public key SSH). So is this danger if you are doing this on a dataset that is shard by CIFS also? I guess since FTP is not a "share" then logging in through FTP would give you access to all files on the pool. Correct?

The problem is you're using the word "share" wrong. That is why there is confusion. Accessing a file through FTP or SFTP is not a "share" in the sense of NFS/CIFS/AFP. There is no problem mixing SFTP (or FTP) and any of the sharing protocols. 100% fine.

As for your second question, that depends on how you have set up your user/group permissions, and what user you log in to FTP (or SFTP) as. You'll have to Google that.
 

nojohnny101

Wizard
Joined
Dec 3, 2015
Messages
1,477
@DrKK

Thanks for the reply. I understand now. I guess FTP can't "modify" files per say it can just access and delete (depending on permissions). That makes sense.

Thanks!
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,553
For what it's worth, I routinely scp / sftp files to CIFS shares. You only run into problems if you are trying to simultaneously do something with the same file using Cifs and something else. This is because regular UNIX apps won't understand CIFS file locks (which are stored in locking.tdb). For home users this isn't a problem, but in a business setting / multi-user environment this may be a serious problem. Short answer, 'it depends'.
 
Status
Not open for further replies.
Top