Mura Plugin file permissions for developing plugin

181 views Asked by At

I'm trying to develop a Plugin for Mura CMS. When I upload the plugin zip file through the admin panel all the file permissions in the /plugin directory are 644 so I can't modify the cfm files in order to develop and debug on the server without repeating the upload process

My server ftp keeps changing the file permissions back to 644 after I change them to 777

Please could anyone suggest a way to get around this

Thanks David

2

There are 2 answers

0
Steve Withington On

First, if you're running into permissions issues after uploading the file via the Mura administrator, then you need to check the permissions granted to Mura. If Mura has correct permissions, the file will automatically be granted 777, or whatever has been set in the /config/settings.ini.cfm file's defaultfilemode setting.

Secondly, if you wish to try uploading the plugin directly to Mura, unzip the plugin. Then FTP the plugin under the /plugins/ directory. For example: /plugins/YourPlugin/

Then, open /config/settings.ini.cfm and see if you have a setting for autoDiscoverPlugins ... if not, go ahead and add it, then set the value to true. Reload Mura, and then the plugin should be "soft deployed" and you can then go to to the Settings > Plugins, and click the pencil icon to assign it to any site(s).

That said, if after uploading the files via FTP still gives you trouble, then again, it's not a Mura issue, it's due to your server's permissions setup.

Cheers, Steve

0
Mark A Kruger On

The file permissions are coming from whichever process is placing the files. If your FTP server keeps changing the permissions then it is possible some process (CI server, dreamweaver refresh - something) is copying files to your server through FTP. So first I would check to see if that is the case. FTP servers don't usually change file permissions on their own. They do however copy files to directories with permissions - usually inherited from the user under which they run.

From your question I suspect you are editing the files directly through an FTP editor (eclipse, homesite, DW) as a part of development. So CF uploads the file through the admin and unpacks it, then you edit it to dev or debug - but the FTP user places the file with 644 permissions. Changing the FTP server user or settings can fix this problem.

If the issue is CF the idea is the same - the user under which CF (Railo/Tomcat) is running bequeaths permissions to the files it places on the disk.

Of course there could be another dameon - security of some sort - that is altering these files.

I would add that by the time you deploy code to a production server you should probably not be editing it on the server. Having said that sometimes debugging can require investigation that may require such editing on an emergency basis. But ongoing development or debugging as a part of development should be happening in your local environment. By the time it gets to a production server it should be well vetted enough to not require editing. That's my take - although I have done my share of editing in production in the past as a stopgap or short term measure, so I do not condemn you :)