Folder with inaccessible permissions (does not allow to change them)

Hi,

Trying to make a folder of the hosting inaccessible in case someone tried to visualize the content, I changed the permissions to 000 thinking that I could return them to normal later and now I can not access the folder by FTP or change the permissions to 0755.

Can any of the administrators re-establish the permissions of the folder? I’m not sure if the subfolders have inherited this permission.

The path of the folder is: /htdocs/forum/install hosted on the domain (domain name deleted for privacy).

Thanks!

If you removed your own permissions to make changes to files(CHMOD never go under 6xx), then you cannot make changes to those files again, including changing their permissions. Unfortunately, there are no safeguards at this time to prevent you from locking yourself out, and no way to reset file permissions if you do.

I’m sorry, but all I can recommend is to either ignore the folder if you can, or move the domain to another folder (possibly another account) if you need to.

If I had known before … I scratched my big toe before changing it :joy:

I thought that some administrator could give me back access.

I’ll have to ignore it :disappointed_relieved:

Anyway thank you very much.

1 Like

create .htaccess file in root of your htdocs
and put this code inside

# Disable Directory Listings in this Directory and Subdirectories
# This will hide the files from the public unless they know direct URLs
Options -Indexes
1 Like

Thank you! I had forgotten the existence of .htaccess :confused:

I’m going to apply it to my page.

Have a nice day.

1 Like

yw :slight_smile:

the next thing you need (probably you already know) if you do not want to see 403 page from infinityfree

if your forum/site does not handle that automatically (dynamic sites)
than the simplest way is to edit .htaccess file inside of your htdocs folder and add this

# error redirect
ErrorDocument 403 http://yourdomain/403.html
ErrorDocument 404 http://yourdomain/404.html

of course, the error pages with the same names must exist

also make sure that the address of these pages is absolute (start with http/s)
and not relative

because if is relative…
when someone comes to the subfolder of the subfolder and ask something that does not exist or does not have permission it will appear infinityfree error pages not your custom

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.