Skip to content
This repository has been archived by the owner on May 7, 2020. It is now read-only.

File permissions within the package #2

Open
mudrd8mz opened this issue Mar 27, 2015 · 3 comments
Open

File permissions within the package #2

mudrd8mz opened this issue Mar 27, 2015 · 3 comments

Comments

@mudrd8mz
Copy link

I just found that some files/dirs inside the ZIP uploaded into https://moodle.org/plugins/pluginversion.php?id=8267 have permissions set to 0700 which caused troubles for me after unzipping the package:

-rw-r--r-- 1 mudrd8mz mudrd8mz 1338 Mar 26 00:43 filterlocalsettings.php
-rw-r--r-- 1 mudrd8mz mudrd8mz 4247 Mar 26 00:43 filter.php
drwx------ 6 mudrd8mz mudrd8mz 4096 Mar 26 22:16 jecho
drwx------ 8 mudrd8mz mudrd8mz 4096 Mar 26 22:16 lang
-rw-r--r-- 1 mudrd8mz mudrd8mz 3842 Mar 26 00:43 LISEZMOI.txt
-rw-r--r-- 1 mudrd8mz mudrd8mz 3331 Mar 26 00:43 README.txt
-rw-r--r-- 1 mudrd8mz mudrd8mz 1051 Mar 26 00:43 settings.php
-rw-r--r-- 1 mudrd8mz mudrd8mz 1629 Mar 26 23:37 version.php

See that the group does not have access to the lang directory which can cause troubles during the installation in some situations.

If you are packaging the ZIP yourself (instead of letting the Github do it for you), please make sure to set the correct files permission.

@pcardona34
Copy link
Owner

The Zip is made by Github, but in my computer, the repository is outside Moodle and I made copies of the modified files into Moodle to update the view. I was afraid to loose my files if I developed those directly in Moodle. Maybe I am doing all the wrong way. Can You explain to me the right method and where to develop the filter and how not to loose it if I do uninstall-install again the filter to test the installation ?

@mudrd8mz
Copy link
Author

mudrd8mz commented Apr 7, 2015

It's not a problem to keep the local clone outside the Moodle's root. Just make sure the dirs and files have common u=rwX,go=rX permissions set before packaging.
Regarding the workflow, it should be pretty safe to keep the DEV version of the plugin inside Moodle. On uninstallation, it always asks for confirmation before it deletes the files (IIRC, even then it moves them into a temporary trash directory instead of actually removing them). Additionally, if the plugin is recognized as a Git checkout, Moodle refuses to remove the files - exactly for the reasons you describe.

@pcardona34
Copy link
Owner

Hi,
Thanks for those aknowledgements. Now I am working on the i18n of the
generator. I will go back soon to propose a better filter package
Le 7 avr. 2015 20:40, "David Mudrák" [email protected] a écrit :

It's not a problem to keep the local clone outside the Moodle's root. Just
make sure the dirs and files have common u=rwX,go=rX permissions set
before packaging.
Regarding the workflow, it should be pretty safe to keep the DEV version
of the plugin inside Moodle. On uninstallation, it always asks for
confirmation before it deletes the files (IIRC, even then it moves them
into a temporary trash directory instead of actually removing them).
Additionally, if the plugin is recognized as a Git checkout, Moodle refuses
to remove the files - exactly for the reasons you describe.


Reply to this email directly or view it on GitHub
#2 (comment)
.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants