Usb volume accessible from FTP when fpt sharing is disabled

Please post questions and issues pertaining to share access and file permission here.

Moderator: ewok

Similar topics


Usb volume accessible from FTP when fpt sharing is disabled

Postby zfil » Sun Feb 15, 2009 3:32 pm

Hello

I've a DUO with RAIDiator 4.1.4.
I've noticed that there is a problem with the script that is launched after a usb volume is plugged :
Code: Select all
/frontview/bin/setup_usb_storage

The function SetupFTPShare() is always called (even if ftp access is disabled in frontview for this share).
This function create a mount point of the usb share under /home/ftp making it accessible by ftp (at least when ftp is configured as anonymous).

The solution is to add a small test before calling the function :
Code: Select all
# diff setup_usb_storage setup_usb_storage.orig
548,550c548
<   if (-f "$USB_ACCESS_PATH_CUSTOM/$name/proftpd") {
<     SetupFTPShare($name);
<   }
---
>   SetupFTPShare($name);


Could you please make sure this path (or a better one :)) is included in the next release ?

Cheers
zfil
ReadyNAS User
 
Posts: 72
Joined: Sun Jul 13, 2008 6:38 am
ReadyNAS: Duo

Re: Usb volume accessible from FTP when fpt sharing is disabled

Postby ewok » Wed Feb 18, 2009 12:27 pm

Thanks for the info. We made a similar change for the next release.
User avatar
ewok
Jedi Council
 
Posts: 8318
Joined: Tue Mar 08, 2005 3:58 pm
Location: Fremont, CA
ReadyNAS: NV+

Re: Usb volume accessible from FTP when fpt sharing is disabled

Postby texo » Mon Apr 20, 2009 2:42 am

Hi!

It seems that the change does not make it into the release. I use RAIDiator 4.1.5 [1.00a043] and still have this problem:
I use an usb-device for periodical backup permanently sticked in the readynas. Everytime i reboot the readynas the usb-device gets visible to every user that log in via ftp (regardless of what is customized for the usb-device in frontview)!
- ftp is on user authentication mode
- Share Name: USB_FLASH_1
- FTP Default Access: Disabled
- FTP Share Access Restrictions: nothing selected
- FTP-Icon in frontview is grey (no pen)

When i change something (for example change "Write-enabled users" to "admin") and apply the change all usb-devices disappear in ftp access (except admin i guess). I think it does not matter what you change. Only the apply-button does the trick.

I think this problem is similar to that "zfil" mentionend in his post. Is there a solution for this problem?

texo
texo
ReadyNAS Newbie
 
Posts: 11
Joined: Mon Sep 08, 2008 6:13 am

Re: Usb volume accessible from FTP when fpt sharing is disabled

Postby ewok » Mon Apr 20, 2009 5:17 pm

So you're saying that if you disabled FTP access to all USB shares, noone is able to access them, but when you change the access to the USB drive (just the FTP protocol or for all protocols?), then FTP access appears to all users?
User avatar
ewok
Jedi Council
 
Posts: 8318
Joined: Tue Mar 08, 2005 3:58 pm
Location: Fremont, CA
ReadyNAS: NV+

Re: Usb volume accessible from FTP when fpt sharing is disabled

Postby texo » Tue Apr 21, 2009 12:12 am

ewok wrote:So you're saying that if you disabled FTP access to all USB shares, noone is able to access them, but when you change the access to the USB drive (just the FTP protocol or for all protocols?), then FTP access appears to all users?


No, it's just the other way around!
FTP access is completely disabled for the usb-device. If i restart the readynas with the usb-device connected, everyone on FTP has access to the usb-device.
When i change something in FTP access for the usb-device (does not matter what exactly) and hit the apply-button the FTP-users have no longer access to the usb-device (which should be the right behavior). When i restart the readynas erveryone has access to the usb-device again!

Maybe it is a booting problem. FTP-Service and USB-Connect (with rights given) does not boot in the right sequence?
Or this is similar to zfils problem.

Thanks for your help,
Texo
texo
ReadyNAS Newbie
 
Posts: 11
Joined: Mon Sep 08, 2008 6:13 am

Re: Usb volume accessible from FTP when fpt sharing is disabled

Postby ewok » Tue Apr 21, 2009 4:06 pm

Thanks for the info. We've been able to reproduce the problem and will have a fix in a future firmware release.
User avatar
ewok
Jedi Council
 
Posts: 8318
Joined: Tue Mar 08, 2005 3:58 pm
Location: Fremont, CA
ReadyNAS: NV+

Re: Usb volume accessible from FTP when fpt sharing is disabled

Postby texo » Tue Apr 21, 2009 10:32 pm

Good news!

Keep up the good work!
texo
ReadyNAS Newbie
 
Posts: 11
Joined: Mon Sep 08, 2008 6:13 am

Re: Usb volume accessible from FTP when fpt sharing is disabled

Postby zfil » Mon May 04, 2009 2:20 pm

Hum ... good work ... well not really in fact :x

Frankly I can't see where is this fix you told me about ...

At least a quick diff between 4.1.4 and 4.1.5 /frontview/bin/setup_usb_storage show no changes :
Code: Select all
# ll frontview_bin/setup_usb_storage /frontview/bin/setup_usb_storage
-rwx------    1 admin    admin       20182 Apr 11 18:24 /frontview/bin/setup_usb_storage
-rwx------    1 root     root        20182 Nov  8 14:22 frontview_bin/setup_usb_storage
# diff frontview_bin/setup_usb_storage /frontview/bin/setup_usb_storage
#


So why you didn't include my changes, is it a sort of engineering pride thing :wink: ?
zfil
ReadyNAS User
 
Posts: 72
Joined: Sun Jul 13, 2008 6:38 am
ReadyNAS: Duo

Re: Usb volume accessible from FTP when fpt sharing is disabled

Postby ewok » Mon May 04, 2009 2:44 pm

Unfortunately, it didn't make it into 4.1.5. It's in the 4.1.6 beta in the beta forum, however.
User avatar
ewok
Jedi Council
 
Posts: 8318
Joined: Tue Mar 08, 2005 3:58 pm
Location: Fremont, CA
ReadyNAS: NV+

Re: Usb volume accessible from FTP when fpt sharing is disabled

Postby zfil » Thu May 07, 2009 1:47 pm

Installed 4.1.6 and cool the fix is there :)

Thanks !

Code: Select all
# diff /frontview/bin/setup_usb_storage backup_conf/frontview_bin/setup_usb_storage.orig
548,551c548
<   if( -f "$USB_ACCESS_PATH_CUSTOM/$name/proftpd" ||
<       ! -d "$USB_ACCESS_PATH_CUSTOM/$name" ) {
<     SetupFTPShare($name);
<   }
---
>   SetupFTPShare($name);
zfil
ReadyNAS User
 
Posts: 72
Joined: Sun Jul 13, 2008 6:38 am
ReadyNAS: Duo


Return to Share Access and File Permission

Similar topics


Who is online

Users browsing this forum: Daumoa [Crawler], Dijjital, zeke56 and 6 guests