PDA

View Full Version : Hide certain filetypes


Rusher
04-24-2013, 09:43 AM
Hi

wondering if there is a way i can get ioftpd to hide files with certain extensions ?

for example i have files asdf.effe and kul.effe can ioftpd hide .effe files to users ?

Yil
04-24-2013, 11:53 AM
There is currently no way to hide files depending upon their extension, but I'll add that to the suggestion list. ioFTPD does hide any file that starts with .ioftpd so it can hide it's own permission file and a number of exec based scripts take advantage of this with filenames for their use like .ioftpd.lock, etc.

ioFTPD also hides any file/directory that is marked by windows as a hidden file. This hides thinks like Thumbs.db, Folder.jpg, as well as important directories like the Recycle bin, System Information, etc if you've shared the root folder of a drive (that is NOT recommended).

If no user (including master accounts) should see the file you could just tag them as hidden in windows. This means you won't see them in explorer unless you have Show Hidden Files/Folders enabled in windows. I know ioFTPD correctly handles the expected hidden files like thumbs.db but it will assume any others are probably important for some reason and not move them across drives during rename/move operations, nor compute their size during things like site size, etc.

Rusher
04-24-2013, 02:37 PM
selecting files and setting them as +h will not work in my case :/

i will happily wait till you release next version Yil if you can squeeze that function into code :D

Rusher
05-14-2013, 01:31 PM
would it be possible to set the filtypes so they cant be downloaded instead ?

in ioftpd.ini something like

Download = /*.bunke !*

tried that but didnt wrk :/ perhaps with different syntax ? =) ideas any1 ?

Yil
05-17-2013, 07:18 PM
That should actually work to prevent downloading a file, but you would still see it in the listing which was the request. If you define a Download rule like *.extension and it exists BEFORE any other matching Download rule it should take precedence and use it's permissions. However M flagged accounts are exempt from most rules, including this one, so it's likely it worked for you but wouldn't have for regular users.

The only other trick I can think of that might work for even for M flagged users is to define a new Section with a pattern like *.extension and make sure nobody has credits and has a ratio defined for it. You could define as many extensions as you wanted mapped to that same section with multiple rules much like you can with ordinary path based sections. The reason this might work differently is I don't think there is an exception for M flagged users on the credit check since I figured everybody would have no-ratio set or be able to set it that way if they wanted... Again this would only prevent downloading matching files, but you would still see them in the listing.

Rusher
10-20-2013, 02:39 AM
If you define a Download rule like *.extension and it exists BEFORE any other matching Download rule it should take precedence and use it's permissions. .

That worked ! before i had it after all the other permissions now its on top. thanks !