Unable to create folders using FTP(es)

Status
Not open for further replies.

Max-E

Cadet
Joined
Dec 19, 2014
Messages
8
Hi,

I'm new to FreeNas and I've been playing with it for last couple of days. I've also watched a lot of how to videos but unfortunately I couldn't find the solution to my problem.

So I have an FTP using TLS and I works great internal and external. I can copy files to or from it. The only thing I can't do is create folders on it. I always get an error saying "Operation not permitted". I'm guessing I'm missing some settings but I can't find it...

I'm using FileZilla btw.

Does anyone have an idea on how to fix this?

Much appreciated,


Max
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
I've run into this problem too. The problem is that Filezilla creates a directory and then does a "chmod" of the directory to set permissions. If the dataset or zpool you are putting FTP on is set for Windows ACLs then chmod will be broken and you'll get an error on Filezilla. The fixes I can think of:

1. Don't use Filezilla.

2. Don't put your FTP server on a dataset that is setup for Windows ACLs.
 

Max-E

Cadet
Joined
Dec 19, 2014
Messages
8
I've run into this problem too. The problem is that Filezilla creates a directory and then does a "chmod" of the directory to set permissions. If the dataset or zpool you are putting FTP on is set for Windows ACLs then chmod will be broken and you'll get an error on Filezilla. The fixes I can think of:

1. Don't use Filezilla.

2. Don't put your FTP server on a dataset that is setup for Windows ACLs.

Hi,

Thank you for your answer, I took a look at the dataset permissions and it's setup for UNIX , Owner has Read Write Execute, Same thing for GROUP, Other has Read and Execute, One thing I noticed whenever I give the write permission to other and press save and then open the menu again then other has "lost" its write permission. Is this normal behavior?

I've also tried to change the permission type from UNIX to Mac and even Windows but that all makes no difference :(.

Do you think another FTP client won't give me this problem? Can you advise me another one then? I will continue to investigate this, but i'm really running low on ideas to fix this.


EDIT: Connected to my ftp using windows explorer, same problem :( Uploading files no problem, creating directories always gives me 550 error ... I will try to create a new dataset to see if this solves the issue..
 
Last edited:

desertrider

Dabbler
Joined
Apr 19, 2015
Messages
12
I used "setfacl -b DirectoryName" e.g. had a directory called FTP and ran the command "setfacl -b /mnt/VolumeName/FTP"

Now I can create directories with FTP. Also my CIFS is working - I am using this dataset, named FTP, for both FTP & CIFS - I saw where many say not to do this but as it is working I am going to leave it.

Also I can go to my dataset - change permissions - Permission Type = UNIX and now all checkboxes stay checked when I change the permissions recursively - before the write checkbox on OTHER would not stay.

When I made the CIFS, on my dataset, I unchecked the box for "Apply Default Permissions" - for if you let it do default permissions then I think you will end up with ACLs linked to the folders / files again - not sure but just making note here for those trying to resolve this issue.

I had same problem and could not create a directory using FTP.

I guess the ACL file permissions were set on the dataset prior - I believe this setfacl command removes information in DIR/Files that has to do with ACLs.

Does anybody know if using this "setfacl -b" would create any other problems with the dataset / folders / files?.

My FTP & CIFS is now working great but not sure what side affects this might cause. Any input here would be appreciated?
 
Last edited:

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Now I can create directories with FTP. Also my CIFS is working - I am using this dataset, named FTP, for both FTP & CIFS - I saw where many say not to do this but as it is working I am going to leave it.

My FTP & CIFS is now working great but not sure what side affects this might cause. Any input here would be appreciated?

For the record, nobody said it wouldn't work. From the manual:

Note

while the GUI will let you do it, it is a bad idea to share the same volume or dataset using multiple types of access methods. Different types of shares and services use different file locking methods. For example, if the same volume is configured to use both NFS and FTP, NFS will lock a file for editing by an NFS user, but a FTP user can simultaneously edit or delete that file. This will result in lost edits and confused users. Another example: if a volume is configured for both AFP and CIFS, Windows users may be confused by the extra filenames used by Mac files and delete the ones they don’t understand; this will corrupt the files on the AFP share. Pick the one type of share or service that makes the most sense for the types of clients that will access that volume, and configure that volume for that one type of share or service. If you need to support multiple types of shares, divide the volume into datasets and use one dataset per share.

I don't think I need to say more. Put simply, it won't throw errors or anything, but you'll find yourself with corrupt files suddenly, and regularly. And you'll be left wondering how your files are getting corrupted in a seemingly random pattern.
 
Status
Not open for further replies.
Top