Closed Bug 292874 Opened 20 years ago Closed 20 years ago

collectstats.pl fails when not run as root if checksetup was run as root

Categories

(Bugzilla :: Installation & Upgrading, defect)

x86
Linux
defect
Not set
minor

Tracking

()

RESOLVED INVALID

People

(Reporter: bgeorge, Unassigned)

Details

User-Agent:       Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322)
Build Identifier: 

When I run checksetup it resets the permission levels in my /data/mining 
directory back to 640. When cron then runs the collectstats as www-data, it 
finds that it doesn't have the permission levels to access the files.

It seems that checksetup should produce these files at the correct permission 
level

Reproducible: Always

Steps to Reproduce:
1.run collectstats.pl as root
2.su as www-data
3.run checksetup.pl

Actual Results:  
errors relating to permissions

Expected Results:  
not reported a permission error

i'm using the stable code from the 2.18 checkout
Interesting. Yes, this is true, actually. Most people run cron as root, so they
don't encounter this, but in a shared hosting environment this is a problem.

checksetup normally changes the file owner to the person running checksetup,
which would be fine, except that if you're a normal user you can't change
ownership. But that shouldn't be a problem, since you should already own the
files if you unzipped them.

We don't want the webserver to be able to write to the mining directory, but we
do want collectstats to be able to.

But really, if you run checksetup as root, run collectstats as root.
Severity: normal → minor
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: checkstup setting permissions incorrectly for data mining, forcing collectstats to fail → collectstats.pl fails when not run as root if checksetup was run as root
By default, the bugzilla cron task (/etc/cron.daily/bugzilla) runs 
collectstats.pl as www-data:

su www-data -c /usr/share/bugzilla/collectstats.pl


Consequently, if you unzip the bugzilla files as root and run checksetup as 
root, you'll encounter this problem.
There is no default bugzilla cron job. You must be using a package, so contact
the package maintainer. (Perhaps Debian?)
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.