Helpful Information
 
 
Category: PHP / MySQL
PHP Event Calendar and Permission

Hello,

I've installed a PHPEventCalendar on one of the sites I maintain. I am having trouble with the events list. It says:
Can't open /var/www/html/calendar/cl_files/data/config.php file and then says to check permissions. - the installation instructions give info on what the permissions should be set to, but I don't know where to go to change them.

Can someone tell me where to go to check/change permission settings?

Thanks!
Joanne

If you are using FTP, try right clicking on the relevant file, and looking for one of the following: "CHMOD", "Change permissions" or "Properties" in the menu that pops up. If you cannot find it, search the help file of your FTP program for these terms.

Let me know how it goes.

Hi,

thanks for the reply, but I am not using FTP - it's something within the php script that is trying to write to or access files and it's giving me the permission error.

How do you (within the westhost control panel?) set permissions on files or directories?

Thanks!
Joanne

Joanne,

I'm assuming you are using the File Manager which you can access via the WestHost 2.0 Site Manager: Log in, and then click on Site Management, and then click the button labelled Login under File Manager. This will open a new window with the File Manager ready for use. Navigate to the relevant directory - the one that contains the file(s) whose permissions you need to modify. Note the Current Directory: path that appears. Right click on the button labelled Execute a Shell Command (located top right), select Open Link In New Window. In that new window, the page will load, and it will contain a text input box. In that box you need to type the following (it is case sensitive, so use all lowercase):


chmod 755 /var/www/html/mydirectory/myfile.txt

Where 755 has to be replaced with the "permission level" that the script requires (e.g. 666, 644, etc.). Replace /var/www/html/mydirectory/myfile.txt with the full path to the file whose permissions needs to be changed. Click the Submit button. Unfortunately, no output/confirmation is shown. The page is simply reloaded. So, to check that your command was successful, go back to the other window that contains the directory/file listing. Have a look at the value under the "Mode" column next to the file you changed permissions for. Hit the refresh button, and take a look at those values again. If successful, these should have changed. Repeat as necessary for each file you need to modify this way. I think there is a way/shortcut to do more than one file at once, but I cannot remember it at this time. If you have many files that you need to do this for, let me know and I'll try and look up that shortcut for you.

Thank you for the detailed reply.

I started to follow your directions, but when I opened the link in a new window it said:

WARNING!
Using this feature can severely damage your Virtual Dedicated server if you do not know what you are doing! Only use this feature if you know EXACTLY what you are doing or if prompted to do so by Technical Support.

And I was too unsure of myself to continue! I am also not sure what permission level the script requires.

As you can probably tell I am a complete neophyte when it comes to php, scripts and the like.

Let me learn a bit more about the scripts and then I might be brave enough to use the "execute a shell command"

Thank you again for your help!!
Joanne

Joanne,

No problem. And don't worry about that message. While it is true, if you know what you are doing (or follow relevant steps exactly, in this case the steps I provided above) then there is nothing to worry about. Especially not in this case since all we are doing is changing permissions on files, and not editing, moving or deleteing them at all. If you like, I could look up the permission levels needed - but you need to supply me with a URL to a readme or something that has this information. In any case, learning more about these things is a good first step towards learning more about your VDS, etc. so take your time :)










privacy (GDPR)