This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 177826 - Provide a rights to create folder under /var/opt/kenai/apache2/metrics-tier/htdocs on quality2.netbeans.org
Summary: Provide a rights to create folder under /var/opt/kenai/apache2/metrics-tier/h...
Status: VERIFIED FIXED
Alias: None
Product: www
Classification: Unclassified
Component: Admin (show other bugs)
Version: 6.x
Hardware: PC Linux
: P1 normal (vote)
Assignee: leawang
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-30 01:54 UTC by Marian Mirilovic
Modified: 2009-12-09 07:10 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marian Mirilovic 2009-11-30 01:54:58 UTC

    
Comment 1 leawang 2009-12-01 03:03:37 UTC
do you need folders to be created by some automatic process or just a particular user or user group?  Thanks.
Comment 2 Marian Mirilovic 2009-12-01 04:06:29 UTC
automatic process that is running under "webservd" user
Comment 3 leawang 2009-12-02 10:15:37 UTC
Granted the permission.
Comment 4 Marian Mirilovic 2009-12-02 10:21:04 UTC
Am I too fast ?

http://quality2.netbeans.org/hudson/job/NB%206.8%20Fixed%20Resolved%20stats/13/console

+ cd /var/opt/kenai/apache2/metrics-tier/htdocs
+ whoami
webservd
+ mkdir metrics
mkdir: metrics: [Permission denied]
Comment 5 leawang 2009-12-02 10:33:28 UTC
Marian, one more question, which directories that you need to be created in htdocs for metrix?  Maybe we can use puppet to create them for you instead of giving you open access.  Thanks.
Comment 6 leawang 2009-12-02 10:38:25 UTC
No, you are not too fast. I realized after I resolved the bug that puppet controls that, so I should have made changes in puppet.  So I reopened the bug and added an comment. We proper not giving you wide access, but specific directories.
Comment 7 Marco Walther 2009-12-02 10:57:37 UTC
I know you will not like me after this;-) But I have a couple of questions &
comments:

* Why are you running everything as webservd? It's NOT a good idea to let the
webserver-user write into the DocumentRoot. 

* So I would like to know, what's supposed to write where and why does it have
to run as webservd?

* What's supposed to read that stuff?

Thanks,
-- Marco
Comment 8 Marian Mirilovic 2009-12-03 01:40:56 UTC
(In reply to comment #5)
> Marian, one more question, which directories that you need to be created in
> htdocs for metrix?  Maybe we can use puppet to create them for you instead of
> giving you open access.
No, I do not want to rely on anything like puppet !

(In reply to comment #6)
> No, you are not too fast. I realized after I resolved the bug that puppet
> controls that, so I should have made changes in puppet.  So I reopened the bug
> and added an comment. We proper not giving you wide access, but specific
> directories.
I do not want wide access, please provide an access just for directory /var/opt/kenai/apache2/metrics-tier/htdocs for at least one user (me, webservd, Petr Blaha or Martin Balin).


(In reply to comment #7)
> I know you will not like me after this;-) 
I am getting used to answer all your questions and patiently wait for all your "not yet delivered fixes" :(

> * Why are you running everything as webservd? 
We are using hudson as schedule/run/update infrastructure and Hudson is running under webservd user. 

> * So I would like to know, what's supposed to write where and why does it have
> to run as webservd?
Marco, I do not understand this question ... we are generating dashboard/graphs and so on, those files are supposed be publicly available on quality2.netbeans.org ... regarding user we are using for this task see my answer above.
Comment 9 Marco Walther 2009-12-03 17:23:36 UTC
tomcat/hudson is now running as user `hudson'. That user has now write permissions to

drwxr-xr-x   3 hudson   hudson         3 Nov 19 15:24 /var/opt/kenai/apache2/metrics-tier/htdocs/stats
drwxr-xr-x   4 hudson   hudson         6 Dec  3 23:56 /var/opt/kenai/apache2/metrics-tier/htdocs/dashboard
drwxr-xr-x   3 hudson   hudson         3 Dec  4 00:02 /var/opt/kenai/apache2/metrics-tier/htdocs/metrics

The stats & dashboard builds seem to be happy. I tried to update the metrics config.xml but hudson did still take the old one for it's last run.
Comment 10 Marian Mirilovic 2009-12-04 01:49:32 UTC
(In reply to comment #9)
> tomcat/hudson is now running as user `hudson'. That user has now write
> permissions to
> 
> drwxr-xr-x   3 hudson   hudson         3 Nov 19 15:24
> /var/opt/kenai/apache2/metrics-tier/htdocs/stats
> drwxr-xr-x   4 hudson   hudson         6 Dec  3 23:56
> /var/opt/kenai/apache2/metrics-tier/htdocs/dashboard
> drwxr-xr-x   3 hudson   hudson         3 Dec  4 00:02
> /var/opt/kenai/apache2/metrics-tier/htdocs/metrics

I am not sure you read what I wrote, did I ever asked for creating any folder and write permissions to that folder ? 

So, to be clear I want to have a write access to folder 
/var/opt/kenai/apache2/metrics-tier/htdocs
... I would like to minimize interaction with your team and dependency that it's in place after your last change, so I'll never more ask you to change there anything ... e.g.: remove some "temporary files" we created there before your last permissions game.


> The stats & dashboard builds seem to be happy. I tried to update the metrics
> config.xml but hudson did still take the old one for it's last run.

Ok, thanks but just for a future: 
Do not change any our configuration file before exact approval from me or anybody else from NB team!
Comment 11 leawang 2009-12-04 13:03:47 UTC
Hi Marian, does the current setup work for you?  If it does not work, please tell us what needs to be improved, we will resolve it together as a team.

Basically, we did not install the hudson instance before, so we were not aware that it was running as webservd which we prefer it not to be used.
Comment 12 Marco Walther 2009-12-04 15:16:58 UTC
That directory is now owned by hudson.
Comment 13 Marian Mirilovic 2009-12-07 03:12:07 UTC
(In reply to comment #12)
> That directory is now owned by hudson.

Thanks a lot MArco - that was actually fix I was asking for.

BTW: could you please also change owners for the rest of the directory ?

ls -lia /var/opt/kenai/apache2/metrics-tier/htdocs/
325277 drwxr-xr-x   5 hudson   hudson         8 Dec  3 23:35 .
325276 drwxr-xr-x   3 root     root           3 Nov  6 21:59 ..
340371 -rw-r--r--   1 root     root     4172582631 Nov 26 08:13 bugzilladb.sql.gz
319578 drwxr-xr-x   4 hudson   hudson         6 Dec  3 23:56 dashboard
319563 -rw-r--r--   1 root     root         453 Nov  8 10:12 index.html
340660 -rw-r--r--   1 root     root     58081311 Nov 24 11:28 junctiondb.dump
350568 drwxr-xr-x   3 hudson   hudson         3 Dec  4 00:02 metrics
304159 drwxr-xr-x   3 hudson   hudson         3 Nov 19 15:24 stats


Thanks in advance.
Comment 14 Marco Walther 2009-12-07 16:22:37 UTC
Done.
Comment 15 Marian Mirilovic 2009-12-09 07:10:19 UTC
thanks a lot Marco - verified