Fix file permissions.
For directories use 755.
For files use 644.

http://browse-tutorials.com/snippet/give-permissions-recursively-files-o...

CommentFileSizeAuthor
#5 forena_permissions-2211487-5.patch10.7 KBram4nd

Comments

metzlerd’s picture

I'm not sure that this is appropriate for a few reasons:

  1. There are mechanisms in place to for linux admins to control default permissions. Seasoned linux admins will be making sure that the umask is set appropriately for the default desired permissions, and not relying or expecting applications to explicitly set permissions
  2. In some cases doing this can actually compromise the security of a site, because you may have the umask set to 640 instead, in which case the application will be loosening permissions insted of restricting them.
  3. We use ACL's on our file systems and setting permissions to 644 is actually the wrong thing to do. You need to set the default acl instead. In an enterprise environment this is the wrong approach.
  4. Linux is not the only supported operating system for drupal. Why would we be building in operating system specific code into a drupal application?

I realize that I have a different opinion than the default behavior for drupal, and I'm willing to be convinced otherwise, but this seems to cause more problems than it solves? At least it does in my environment.

ram4nd’s picture

The problem is that you must not have execution rights for files. If you can execute php files you are potentially at risk. It's purely for security reasons. You use ACL but your module in drupal org should have the right permissions, cause you are not the only one using it, you can do what you want in the privacy of your own home, but here you have to submit to standards. Most PHP applications run on Linux servers so that is not an argument. You can do your own research about this.

metzlerd’s picture

Really?!

.frx files are not php files and cannot be executed as such. They are data. Are you talking about forena code or are you talking about .frx files created by forena. I am not suggesting that the files shouldn't have the right permissions, just where that permission should be configured and enforced, for maximum security and cross platform compatibility.

I am not talking about the privacy of my own home... Forena is used almost exclusively as an enterprise app, and I have over 15 years of experience in maintaining enterprise linux environments. Perhaps you need to do some research about the proper use of umask in a linux environment and its implications for the security of your sites. Either way you do not appear to be interested in a dialogue about this, but speaking from some standard that you passed on from a non-drupal site reference. If you'd like to report this to the drupal security team, I'll be happy to dialogue with one of its members regarding this issue. I'd also be happy to dialogue with you if you are interested in a reasonable discussion.

I'll leave this open in case a reasonable discussion is actually desired here.

ram4nd’s picture

I am not talking about forena. I am talking about .inc files. Every file in your 7.x-4.x-dev branch have wrong permissions.

ram4nd’s picture

StatusFileSize
new10.7 KB

I even made a patch.

metzlerd’s picture

Status: Active » Fixed

Ok, well that's different then. While I continue to not appreciate your condescending tone.... nor the barage of links... I did adjust the permissions on the php files .inc and .module files in 7.x-3x. and 7.x-4.x dev branches. I would encourage you as you post these patches with other maintainers to be a bit clearer about what you are requesting. I don't know if its your intention but you are coming off quite gruff and condescending.

ram4nd’s picture

English is not my native language, so sorry. I just want to improve Drupal, cause I use it every day. Simplest things are permissions and coding standards. If I don't have much time I am focusing on those.

metzlerd’s picture

All's well that ends well... Some days I am better than others at recognizing language barriers and cultural differences than others. No hard feelings....thanks for the contribution.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.