FTP Server - Dataset issue

yessey

Cadet
Joined
Jul 3, 2020
Messages
6
Hello everyone!

Here's what I have:

FreeNAS v. 11.3-U3.2

I've setup FTP Server. Created a group/user and two datasets "office","Scan". "Scan" is child dataset & there's several files in it. So when I try to delete Dataset folder "Scan" in Filezilla i got this message "550 Scan : Device Busy", I can't delete the folder It's Ok! But! that files in that folder gone away. Is this a bug or permissions issue ?
 

Attachments

  • 1593773759744.png
    1593773759744.png
    15.7 KB · Views: 218
  • 1593774121568.png
    1593774121568.png
    15.7 KB · Views: 207
  • 1593774141374.png
    1593774141374.png
    15.7 KB · Views: 202

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
Neither. ZFS won't allow ordinary Unix removal mechanisms to delete datasets. Since Scan is a dataset, the only way to delete that is from Storage->Pools, then clicking on the 3 dots next to Scan, and selecting Delete Dataset. You can also delete it from shell via zfs destroy <parent pool>/office/Scan or whatever the path to Scan is.
 

yessey

Cadet
Joined
Jul 3, 2020
Messages
6
Neither. ZFS won't allow ordinary Unix removal mechanisms to delete datasets. Since Scan is a dataset, the only way to delete that is from Storage->Pools, then clicking on the 3 dots next to Scan, and selecting Delete Dataset. You can also delete it from shell via zfs destroy <parent pool>/office/Scan or whatever the path to Scan is.

Hello!

Thank you for Your response. No, I know how to delete datasets generally. My issue is about - Why files in dataset goes away when I try to delete dataset folder in FTP client ?
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
Because deleting a folder in FTP issues rm -rf behind the scenes, but the rm fails to remove the "folder" as it's a dataset.
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
I don't understand what you're trying to accomplish. Are you trying to protect the files within the dataset from deletion? Or are you trying to delete the dataset?
 

yessey

Cadet
Joined
Jul 3, 2020
Messages
6
I don't understand what you're trying to accomplish. Are you trying to protect the files within the dataset from deletion? Or are you trying to delete the dataset?

I'm trying to protect the files in dataset from deletion, if anyone tries to delete dataset folder.
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399

yessey

Cadet
Joined
Jul 3, 2020
Messages
6
See http://www.proftpd.org/docs/howto/Limit.html. You'll need to create something like this in the FTP service Auxiliary parameters:
Code:
<Directory /mnt/path/to/Scan>
  <Limit DELE>
    DenyAll
  </Limit>
</Directory>

Thank you! This is very useful! What if I want to protect deletion ONLY specific directory ? I try to delete directory "Scan" then I got "permission denied" message, but I can delete every file in that directory :)
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
The limit statement applies to all files within that directory statement.
 
Top