rejetto forum

Software => HFS ~ HTTP File Server => Topic started by: gogi1000 on July 09, 2022, 08:29:11 PM

Title: read permision with download file on subfolder
Post by: gogi1000 on July 09, 2022, 08:29:11 PM
i have the hfs. i added folder and in the hfs i added next permisions on this folder: access and upload, without download and no delete. in this folder i added subfolder and  i added on this subfolder next permission: access, with download. i have next problem, on this subfolder exists inherited permissions from parent folder, so the users in this subfolder can upload files. i need breaking inheritance, in this subfolder the users just can access and download files, but they cannot upload files. can i make this in the hfs?
Title: Re: read permision with download file on subfolder
Post by: rejetto on July 14, 2022, 04:23:56 PM
it's not clear for me if you have a real folder inside the first real folder.
Can you share a screenshot? It should be like this.

My suggestion is
1) create an account "IMPOSSIBLE" with a very hard password
2) give upload permission to IMPOSSIBLE for the subfolder

this will break permission inheritance for upload.
Title: Re: read permision with download file on subfolder
Post by: LeoNeeson on July 15, 2022, 05:58:47 AM
I haven't tested, but Rejetto suggestion should work (since upload permissions are granted only to the subfolder).

If I'm not mistaken, the user is looking that parent's folder permissions not to be inherited to subfolders. He wants to have a public folder (with upload enabled), and a subfolder inside (of that public folder) without upload permission. Both folders without password. Perhaps this was not implemented, at least it's not automatic for subfolders when using real folders.

If you are using real folders, Rejetto's suggestion should work: since manually re-adding that specific subfolder (inside the main folder), should give you the option to configure permissions of the subfolder.

Another option is using virtual folders, where you have full control on any folder (in this case, it's not automatic, and you have to manually configure the upload permission of the subfolder).

Like Rejetto said, a screenshot of your HFS would be very helpful to guide you.
Title: Re: read permision with download file on subfolder
Post by: gogi1000 on July 28, 2022, 01:03:57 PM
i created virtual folders parrent>child. i set the parent folder has access and upload permissions, the child folder has read permission. but when i loginin on my hfs using web. my child folder also has upload permission but i just set read permission
Title: Re: read permision with download file on subfolder
Post by: LeoNeeson on July 30, 2022, 01:44:55 PM
If this happens when using 'virtual folders', then this could be either a bug or it was not implemented. I currently don't have free time to check the source code to see if this has an easy solution, sorry. :(
Title: Re: read permision with download file on subfolder
Post by: Mars on July 30, 2022, 06:21:32 PM
virtual folders do not have permission to perform uploads, only real folders mounted in the VFS have this possibility

if the subfolder is a physical child on the hard disk of the uploaded folder, it will have the same rights as its parent, on the other hand if the two directories are neither parent of one nor parent of the other, it is possible to mount the 2nd as a child of the first in the VFS as actual directories (red folder icons) and individually assign the necessary permissions but it does seem like the inheritance persists, a solution to invalidate it is to put a filter mask for the upload of the sub-directory in the files mask tab, put \*.* in the upload field ( which means none matching the mask *.*)


this will not prevent the user from being able to send a file, but hfs will refuse to save it


the solution that can be adopted is to create an account named for example "noupload" protected by a password not found with special characters

we configure the parent to authorize the upload to any authorized person, then for the subfolder we only authorize the upload for the "noupload" account, this deactivates parental inheritance and the upload button will not appear, for remote maintenance needs, we can also authorize the upload for the account that manages the server in addition to the right to delete the subfolder

I remind you that the child must not be a direct subdirectory of the parent on the disk, although theoretically it could work indirectly
I see that it is the exact suggestion from rejetto above
Title: Re: read permision with download file on subfolder
Post by: LeoNeeson on July 31, 2022, 03:06:04 PM
I see that it is the exact suggestion from rejetto above
Your post is also very helpful and informative. :)

virtual folders do not have permission to perform uploads, only real folders mounted in the VFS have this possibility
This is new to me (but it makes sense, since 'virtual folders' are static resources).
Title: Re: read permision with download file on subfolder
Post by: Mars on July 31, 2022, 03:59:53 PM
A forgotten event appeared while extending the legacy tests

we start from a real folder added to the VFS (we make sure that it does not inherit the upload itself), we assign it the upload rights by checking anyone,
we then add a new virtual folder as a child, we can confirm that the upload is not possible for this child.

To this virtual child if we also add a real folder: named UPLOAD HFS
it then appears a dialog box asking us whether or not we want to authorize the inheritance upload for this 'grandchild' for all, in this case anyone will be checked for this folder otherwise he will still benefit from the rights of upload successive parents.

After verification, it is implemented that any folder name containing the word upload brings up the question