Hello,
I'm trying to develop a simple if condition clause for my otrs.SetPermissions.pl file so that it would set permissions for /opt/otrs/ exlucding or ignoring few paths i.e
/opt/otrs/scripts
/opt/otrs/var/tmp/Article
/opt/otrs/var/tmp/Ticket
..
..
or may be passing a variable that matches to ignore multiple paths using qr ?
Can someone provide some inputs.
Thanks,
M.
Regex
-
- Znuny superhero
- Posts: 889
- Joined: 15 Dec 2016, 15:13
- Znuny Version: All
- Real Name: Emin
- Company: Efflux GmbH
- Contact:
Re: Regex
Hey,
If you only want to ignore articles, you can go for the parameter --skip-article-dir
If you also want to add multiple paths, go for:
/opt/otrs/bin/otrs.SetPermissions.pl --skip-article-dir --skip-regex="^/scripts/" --skip-regex="^/NextFolder/EvenWithSubfolders/"
The starting point of your RegEx is always the home path of OTRS.
Best regards
Emin
If you only want to ignore articles, you can go for the parameter --skip-article-dir
If you also want to add multiple paths, go for:
/opt/otrs/bin/otrs.SetPermissions.pl --skip-article-dir --skip-regex="^/scripts/" --skip-regex="^/NextFolder/EvenWithSubfolders/"
The starting point of your RegEx is always the home path of OTRS.
Best regards
Emin
Professional OTRS, Znuny & OTOBO services: efflux.de | efflux.de/en/
Free and premium add-ons: German | English
Free and premium add-ons: German | English
Re: Regex
Thanks for the reply Emin. thats actually a good solution but Im setting up SeLinx labels: For, Home dir (/opt/otrs) it needs sys_content(read only) excluding some folders under /opt/otrs/var that needs rw_content and .pl files that need exec permissions. So, if I use skip-regex that would intent to skill totally and I cannot have the permissions needed. So, If feel a simple regex function with if clause inside SetPermissions.pl would be great to have. so that it would be specific for certain folders that are in the list.
Hope you understood what Im trying to acheive.
Thanks,
M.
Hope you understood what Im trying to acheive.
Thanks,
M.
Re: Regex
OTRS user and webserver need full access in whole OTRS home directory. Otherwise Package Manager and other tools will not work correctly
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master
Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
"Testing": ((OTRS Community Edition)) and git Master
Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
Re: Regex
Yes, under /opt/otrs , the directory permissions are 750 and files has 640 with otrs as an user and apache as a admin and webgroup. So, I think OTRS is happy with the permissions.
All I need is a solution for the use case mentioned above.
All I need is a solution for the use case mentioned above.