If someone has the private-files directory set then security review will mark it as a problem, but it's not a problem.

Comments

greggles’s picture

Status: Active » Needs review
StatusFileSize
new684 bytes

and patch.

coltrane’s picture

Status: Needs review » Needs work
greggles’s picture

I probably won't have time for this in the near future.

simone960’s picture

I encountered that too. I have created a private file and set permission to "777" at the root directory.

Security module identified this as problem. But if I don't set "private" as "777", configuration at File system page will have problem to save. Security review module take it as problem.

coltrane’s picture

Status: Needs work » Needs review
StatusFileSize
new711 bytes

Updated comment for check and found that the private files check only ran if private files was set as default. That check should run whenever the private files directory is set. Sneaking that into this patch.

coltrane’s picture

StatusFileSize
new711 bytes

had to remove the private files test now that it's being checked correctly.

coltrane’s picture

And those last two were the wrong patches. Here we go!

coltrane’s picture

raulmuroc’s picture

Did somebody test this? To me it continuos to set 'private_files' as dangerous to be writable.

With the patch applied to an older version of the module or with the module holding commit.

coltrane’s picture

Status: Fixed » Needs work

I tested but it sounds like additional testing is necessary! Where is your private files directory? Can you confirm it's listed in this check when running 7.x-1.x-dev branch on your site?

raulmuroc’s picture

I now downloaded latest 7.x-1.x-dev version through git and did security review.

I get:

It is recommended that the following files or directories be corrected.

./private_files/backup_migrate/manual/test.txt
./private_files/backup_migrate/scheduled
./private_files/backup_migrate
./private_files
As well as all the files inside this directory

So yes, it needs to be reviewed ;)

coltrane’s picture

Not to belabor the point, but can you confirm that 'private_files' is what you have entered as the path to you private files on admin/config/media/file-system ?

coltrane’s picture

@RaulMuroc also what type of web server are you running this check on? I haven't yet been able to replicate this error so any information you can provide will be helpful, thank you.

raulmuroc’s picture

In admin/config/media/file-system:
Private file system path
private_files

So this is correct :S

Web server:

Linux vls104.dinaserver.com 3.0.4-dh-xen-32 i686
apache2

Hope it helps.

coltrane’s picture

Status: Needs work » Needs review
StatusFileSize
new695 bytes

Ah, I can replicate! I forget right now why a leading character is chopped off the private files string but it was causing it to not match when the private files directory was in the web root. This should fix it!

coltrane’s picture

raulmuroc’s picture

Status: Fixed » Closed (fixed)

Nice work :-)!