June 23, 200818 yr Hi, Since I upgraded to v4.3 (starting with beta1), I have had problems accessing the web interface and browsing directories via the build-in FTP-server. When I reboot the Unraid system (via telnet), there are no problems accessing the web interface when the server comes up. But when the system has been running for a about day or more I can no longer access the web interface (I have to reboot the system to access the web interface again). The FTP problem is that I’m not able to browse the directories on the server. I can browse the “disk1”, “disk2” and “user” folders, but not folders lower down. My FTP client says: “226 Transfer done (but failed to open directory).” I have tested the connection using telnet “unraid-server” 80 and 21 to see if it was a port issue, but that’s not the case. The problem is the same accessing the Unraid system from the Internet and from my internal network. Is it possible to restart the web-server and FTP-server via telnet, to see if it’s a WEB/FTP-server problem? I have atteched my syslog (It seems that someone has tryed to connect to my ftp-server). Cheers, Søren
June 23, 200818 yr I don't have an answer to the ftp problem, but I did notice that your machine is getting brute force hack attempts from the internet. I would suggest that you disable telnet access from the internet... at the very least, set up a high port on your router to then forward the port to your telnet port. > Jun 23 15:35:29 NAS_Serup login[2631]: ROOT LOGIN on `pts/0' from `kmd.kmd.dk' Was this you? In regards to ftp, Check all your directory permissions. All directories should have an x so they are searchable. Then in order to read the directory it needs +r. What account are you using to login with?
June 23, 200818 yr Author I don't have an answer to the ftp problem, but I did notice that your machine is getting brute force hack attempts from the internet. I would suggest that you disable telnet access from the internet... at the very least, set up a high port on your router to then forward the port to your telnet port. Thanks for your suggestion. I'll look into this. Where in the syslog do you see this? From the lines: Jun 23 03:37:05 NAS_Serup vsftpd[2490]: connect from 202.113.244.42 (202.113.244.42) Jun 23 03:37:05 NAS_Serup vsftpd: Mon Jun 23 03:37:05 2008 [pid 2491] CONNECT: Client "202.113.244.42" Jun 23 03:37:06 NAS_Serup vsftpd: Mon Jun 23 03:37:06 2008 [pid 2490] [Administrateur] FAIL LOGIN: Client "202.113.244.42" > Jun 23 15:35:29 NAS_Serup login[2631]: ROOT LOGIN on `pts/0' from `kmd.kmd.dk' Was this you? Yes, thats me. From my work place. In regards to ftp, Check all your directory permissions. All directories should have an x so they are searchable. Then in order to read the directory it needs +r. Sorry to ask, but how do i check this? What account are you using to login with? I'm using the root account - I know this is not the best option - I'm running the basic/free edition of Unraid, and I don't think its possiable to create alternative users. Thanks, Søren
June 23, 200818 yr ls -l displays a directory. Permission control bits are on the left hand side of the screen. x is execute, r - is readable.
June 24, 200818 yr Author Thanks, The permissions are set as follows: root@NAS_Serup:/mnt# ls -l total 0 drwxr-xr-x 6 root root 120 Dec 8 2007 disk1/ drwxr-xr-x 5 root root 96 Feb 6 21:09 disk2/ drwxr-xr-x 1 root root 120 Dec 8 2007 user/ root@NAS_Serup:/mnt# root@NAS_Serup:/mnt# cd user root@NAS_Serup:/mnt/user# ls -l total 0 drwx--x--x 1 root root 48 Dec 6 2007 Anette/ drwx--x--x 1 root root 256 May 25 18:12 Faelles/ drwx--x--x 1 root root 232 Mar 15 17:37 Soeren/ root@NAS_Serup:/mnt/user# cd .. root@NAS_Serup:/mnt# cd disk1 root@NAS_Serup:/mnt/disk1# ls -l total 0 drwx--x--x 2 root root 48 Dec 6 2007 Anette/ drwx--x--x 9 root root 256 May 25 18:12 Faelles/ drwx--x--x 8 root root 232 Mar 15 17:37 Soeren/ root@NAS_Serup:/mnt/disk1# cd .. root@NAS_Serup:/mnt# cd disk2 root@NAS_Serup:/mnt/disk2# ls -l total 0 drwx------ 7 root root 200 Mar 20 20:46 Faelles/ drwx------ 7 root root 200 Jun 1 17:15 Soeren/ root@NAS_Serup:/mnt/disk2# It seems that the folders in /mnt/disk2 has less permissions then the same folders in /mnt/disk1. I have never don anything to change permissions. Cheers, Søren
June 24, 200818 yr That's odd, Not sure why it is that way. You can try and alter the other directory permissions with a chmod g+x,o+x or a chmod g+rx,o+rx
July 1, 200818 yr Author Hi, How should i type this command? If i just type "chmod `g+x,o+x'" nothings seems to happen? Thanks, Søren
July 1, 200818 yr The instructions left out one tiny, but important item. The full syntax of the chown chmod command needs the name of the folder or file to change. chmod g+rx,o+rx /mnt/disk2/Anette chmod g+rx,o+rx /mnt/disk2/Faelles chmod g+rx,o+rx /mnt/disk2/Soeren If there are many sub-folders, you might want to do something like this: find /mnt/disk2 -type d -exec chmod g+rx,o+rx {} \; Joe L. Edited to fix chmod command name.
July 1, 200818 yr Author Joe, when i try to use your commandlines (any of them), i get the error: chown: `g+rx,o+rx': invalid user Why have my permissions been alteret (If have done it myself I dont have any clue of how and when)? Is there a way to reset them to default? Cheers, Søren
July 1, 200818 yr Joe, when i try to use your commandlines (any of them), i get the error: chown: `g+rx,o+rx': invalid user Why have my permissions been alteret (If have done it myself I dont have any clue of how and when)? Is there a way to reset them to default? Cheers, Søren My stupidity. Sorry. chmod (the change mode command) not chown (the change owner command) So the correct commands are: chmod g+rx,o+rx /mnt/disk2/Anette chmod g+rx,o+rx /mnt/disk2/Faelles chmod g+rx,o+rx /mnt/disk2/Soeren or find /mnt/disk2 -type d -exec chmod g+rx,o+rx {} \; Note to self: do not give advice before SECOND cup of morning coffee. Joe L.
July 1, 200818 yr >> The instructions left out one tiny, but important item. >> The full syntax of the chown chmod command needs the name of the folder or file to change. Sorry, My bad. I've been doing this so long that I forget this is new to people. chmod <mode to change> <list of files or directories> chmod g+rx,o+rx file1 file2 file3 directory ... and with chown it is chown user <list of files or directories> chgrp group <list of files or directories> also chgrp and chown can be combined in one command as in chown user:group <list of files or directories>
July 1, 200818 yr It seems that the folders in /mnt/disk2 has less permissions then the same folders in /mnt/disk1. I notice that within syslogs, when Tom creates the mount points, he uses 'mkdir -m 700 /mnt/user' and 'mkdir -m 700 /mnt/disk1', etc. It is possible therefore that when you create top level folders for sharing (through Samba?) that you may be creating them with different permissions than he may use when creating the same top level folders on other disks in the Included Disks list for a User Share.
July 2, 200818 yr Author Hi, Thanks for your advice. I'll give it at try as soon I have my unRAID running again. (Just flashed the BIOS last night, on my Abit AB9 Pro, and now it won't boot any longer :'() Cheers, Søren
July 3, 200818 yr So I had the same ftp issue, and used chmod -R to get access to a test folder. However, this hardly seems like an ideal solution, as now my guest user has full read/write capabilities via ftp. I'm slightly afraid that if I screw around too much and restrict some permissions, I may get in the way of how unRAID uses them for the user and samba shares?
August 6, 200817 yr Author find /mnt/disk2 -type d -exec chmod g+rx,o+rx {} \;[/b] Finally i got around to try this command out. I ran the command on all my drives/disks ie. disk1,2,3. Now i can browser all my folders via ftp BUT i can not download some files. I guess its a question about correct permissions as some files download fine and others don't. The files I can not download has these permissions: -rwx------ The files i can download has these permissions: -rw-r--r-- Can and how do i change the permissions on all files on all drives? Is i just as easy as the command mentioned above? Are the any drawbacks on applying permissions this way A bonus question: Is it possiable to create a dedicated FTP user, that only has access to a spefic folder (so my friends can upload files to me) witeout enabeling "user level security"? Thanks very much in advance. Kind regards, Søren
August 6, 200817 yr find /mnt/disk2 -type d -exec chmod g+rx,o+rx {} \;[/b] Finally i got around to try this command out. I ran the command on all my drives/disks ie. disk1,2,3. Now i can browser all my folders via ftp BUT i can not download some files. That command modified directory permissions. I guess its a question about correct permissions as some files download fine and others don't. The files I can not download has these permissions: -rwx------ The files i can download has these permissions: -rw-r--r-- Can and how do i change the permissions on all files on all drives? Is i just as easy as the command mentioned above? Now, you want to change the mode on the files and leave the directories alone. This should set all the file permissions to -rw-r--r-- find /mnt/disk* -type f -exec chmod 644 {} \; Are the any drawbacks on applying permissions this way Not really. A bonus question: Is it possiable to create a dedicated FTP user, that only has access to a spefic folder (so my friends can upload files to me) witeout enabeling "user level security"? Yes, but then all the permissions need to be set accordingly. It is WAY more difficult to keep your server secure once you open it up to the world. It has nothing to do with "user level security" as implemented by lime-technology. It is unix and ftp security. Tons to read on the web on that topic. (google "unix ftp security" or "linux ftp security") All logins must have non-trivial passwords, additional IDs must be created (read about "useradd") Most secure would be a change-root environment. (read about chroot command) Joe L.
August 6, 200817 yr Author Thanks Joe, that worked very vell Do you know why my permissions has gotten change in the first place? I see I have to do some reading about setting FTP users up. Cheers, Søren
October 11, 200817 yr Søren - You pointed me here from another thread and I wanted to thank you. This was exactly my issue. I setup an hourly cron job to modify the directory and file permissions where needed so that I'm able to access what I need via FTP. You 'da man! Again... Thank you. I'm new to Linux and every clue no matter how small really helps me. EDIT: I almost forgot to thank the folks that pointed you in the right direction. We've got some swell folks on this forum, don't we?
October 12, 200817 yr Author Søren - You pointed me here from another thread and I wanted to thank you. This was exactly my issue. I setup an hourly cron job to modify the directory and file permissions where needed so that I'm able to access what I need via FTP. You 'da man! Again... Thank you. I'm new to Linux and every clue no matter how small really helps me. EDIT: I almost forgot to thank the folks that pointed you in the right direction. We've got some swell folks on this forum, don't we? Just glad I could help and point you in the right direction. I'm by fare no wise with Linux either, luckliy people here are very helpfull BR Søren
Archived
This topic is now archived and is closed to further replies.