Settings disappearing on Unraid [SFTP via Filezilla issues]


lachiu

Recommended Posts

Hello

I'm trying to setup a SFTP connection to my NAS. It sometimes works, and unfortunately, it sometimes doesn't.
I'm also following a course about networks so I've also asked my teacher for help, wasn't expecting anything else btw, he forwarded me to a few courses of him regarding SSH and SFTP which made it a lot clearer for me. I explained my issues, well, long story short, he made a "test" user which almost always has a succesful connection. 

I want to give my friend, Salim, access to share "Vids" (gameplay vids, non 18+) and my father to share "Documenten" (being documents, invoices, etc) 

I've spent the last 4 hours toying around with this, so here's how it looks in "cat /etc/passwd" 
test:x:1009:1009::/home/test:/bin/bash
tss:x:59:59:Account used by the trousers package to sandbox the tcsd daemon:/:/bin/false (not added by me)
papa:x:1010:1000::/mnt/user0/Documenten:/bin/bash
salim:x:1011:1011::/mnt/user0:/bin/bash
 

I've tried using:
- "useradd -g sftp -d /mnt/user0/share-name -s /sbin/nologin papa"

- "useradd -g sftp -d /mnt/user0/share-name -s /sbin/nologin salim"
Doesn't show a difference, figured user "test" works so why not use /bin/bash straight away. 

I can't figure out what triggers it to break the users, normally after adding the user it works, but then...

I've read that I have to edit sshd_config using "sudo nano /etc/ssh/sshd_config" so they have to use the password, going to use the key system later, but first I want this to work. (don't fix what ain't broken).

 

After adding the following, it seems to break/not work:
"Subsystem sftp internal-sftp
    Match group sftp
    ChrootDirectory %h
    ForceCommand internal-sftp"

 

After editing sshd_config I've read that I have to restart the service. None of the other commands like "restart ssh service" work, so I found out that I have to use "/etc/rc.d/rc.sshd restart". 

None of the users, including "test" stop working at this point. I've noticed before that I sometimes have to restart unRAID to get things working so after doing that it suddenly rollsback sshd_config even tho I saved the file to the correct path. (just pressing enter). 

I honestly don't know what I'm missing. I've also got a Kingston A400 240GB in my array causing a lot of errors, sometimes it becomes unmountable even tho I can still read and write from the share that only has that ssd included. I've tried to remove the share and the ssd from the array but I couldn't figure it out, even after reading the wiki.

I hope I explained everything, if something's unclear you know where to comment. Thanks in advance. 

Edited by lachiu
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.