Last modified: 2013-11-18 10:09:02 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T50910, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 48910 - Cannot write as "magnus" to my tools
Cannot write as "magnus" to my tools
Status: RESOLVED WORKSFORME
Product: Wikimedia Labs
Classification: Unclassified
tools (Other open bugs)
unspecified
All All
: High critical
: ---
Assigned To: Marc A. Pelletier
:
: 48926 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-28 20:46 UTC by Magnus Manske
Modified: 2013-11-18 10:09 UTC (History)
8 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Magnus Manske 2013-05-28 20:46:49 UTC
I try to write to the (example) "geograph2commons" tool directory as "magnus" (rather than as the tool user). Despite apparently correct permissions, I get "permission denied":

magnus@tools-login:/data/project/geograph2commons$ touch test
touch: cannot touch `test': Permission denied
magnus@tools-login:/data/project/geograph2commons$ ll -ld .
drwxrwsr-x 4 local-geograph2commons local-geograph2commons 116 May 28 17:37 ./
magnus@tools-login:/data/project/geograph2commons$ groups
wikidev project-bastion project-wikidata-dev project-tools local-flickr2commons local-joanjoc local-magnustools local-catscan2 local-geograph2commons

This is the case on all my tools now. It worked fine until earlier today. Help, urgent!!!

(Might be related to https://bugzilla.wikimedia.org/show_bug.cgi?id=43896 )
Comment 1 Andre Klapper 2013-05-29 06:48:00 UTC
If things are really urgent you might want to ask on IRC in #wikimedia-labs http://www.mediawiki.org/wiki/MediaWiki_on_IRC , or on the mailing list.

> Despite apparently correct permissions

Output welcome so one could also check if it's "apparently correct". :)
Comment 2 Peter Bena 2013-05-29 08:26:53 UTC
Hello I am well aware of this. I believe this problem is related to a daemon that run on nfs server, which sometimes die. The problem is that I have no access to this server and Coren is on vacation.

There is this workaround:

Copy the files to a publicly accessible folder OR folder that you and your tool has access to

example:

mkdir /mnt/magnus
chgrp local-mytool /mnt/magnus
chmod 770 /mnt/magnus
cp myfile /mnt/magnus

#now switch to your tool

become mytool
cp /mnt/magnus/* ~/bin/myfile

I will insert more people from ops to this bug but I don't know if anyone else has any idea how this stuff works
Comment 3 Peter Bena 2013-05-29 08:27:24 UTC
I lowered it to "critical" because there is a workaround (hence no blocker) but it is a problem which needs to be resolved quickly
Comment 4 Peter Bena 2013-05-29 17:14:00 UTC
*** Bug 48926 has been marked as a duplicate of this bug. ***
Comment 5 Magnus Manske 2013-05-29 17:36:59 UTC
Tried your workaround, but:

magnus@tools-login:/data/project/tusc/public_html$ mkdir /tmp/magnus

magnus@tools-login:/data/project/tusc/public_html$ chgrp local-tusc /tmp/magnus
chgrp: changing group of `/tmp/magnus': Operation not permitted

magnus@tools-login:/data/project/tusc/public_html$ ll -ld /tmp/magnus
drwxrwxr-x 1 magnus wikidev 0 May 29 17:34 /tmp/magnus/
Comment 6 CBM 2013-05-29 18:44:37 UTC
It works for me if I sg to the tool's group.

cbm@tools-login:~$ cp Test  ~local-enwp10/
cp: cannot create regular file `/data/project/enwp10/Test': Permission denied
cbm@tools-login:~$ ls -ld ~local-enwp10
drwxrwsr-x 9 local-enwp10 local-enwp10 4096 May 29 17:40 /data/project/enwp10
cbm@tools-login:~$ sg local-enwp10
cbm@tools-login:~$ cp Test ~local-enwp10/
cbm@tools-login:~$ ls -l ~local-enwp10/Test
-rw-rw-r-- 1 cbm local-enwp10 5 May 29 18:41 /data/project/enwp10/Test
Comment 7 Pietrodn 2013-05-30 06:03:41 UTC
(In reply to comment #6)
> It works for me if I sg to the tool's group.
> 
> cbm@tools-login:~$ cp Test  ~local-enwp10/
> cp: cannot create regular file `/data/project/enwp10/Test': Permission denied
> cbm@tools-login:~$ ls -ld ~local-enwp10
> drwxrwsr-x 9 local-enwp10 local-enwp10 4096 May 29 17:40 /data/project/enwp10
> cbm@tools-login:~$ sg local-enwp10
> cbm@tools-login:~$ cp Test ~local-enwp10/
> cbm@tools-login:~$ ls -l ~local-enwp10/Test
> -rw-rw-r-- 1 cbm local-enwp10 5 May 29 18:41 /data/project/enwp10/Test

I also have this problem and the workaround works for me. Thanks!
Comment 8 Peter Bena 2013-05-30 14:33:40 UTC
problem solved
Comment 9 Magnus Manske 2013-05-30 14:40:05 UTC
(In reply to comment #8)
> problem solved

THANK YOU!
Comment 10 Peter Bena 2013-06-05 10:17:04 UTC
magnus, are you sure this is still a problem? it works to me...
Comment 11 Magnus Manske 2013-06-05 10:18:58 UTC
Yup, still a problem for me:

magnus@tools-login:~$ cd /data/project/wikidata-terminator/public_html/
magnus@tools-login:/data/project/wikidata-terminator/public_html$ touch a
touch: cannot touch `a': Permission denied
magnus@tools-login:/data/project/wikidata-terminator/public_html$ groups
wikidev project-bastion project-wikidata-dev project-tools local-flickr2commons local-joanjoc local-magnustools local-catscan2 local-geograph2commons local-tusc local-catfood local-dnbtools local-geohack local-glamtools local-wikidata-terminator
magnus@tools-login:/data/project/wikidata-terminator/public_html$
Comment 12 Marc A. Pelletier 2013-06-05 12:47:55 UTC
The underlying issue is still existing; there are limitations with unauthenticated lists of users from LDAP that we are beginning to hit.

Andrew Bogott is on it.
Comment 13 Magnus Manske 2013-06-08 13:03:14 UTC
Aaaand... it's back, this time only for the new tool "wikidata-todo".

I hope there will be some permanent fix for this soon.
Comment 14 Marc A. Pelletier 2013-06-08 13:13:03 UTC
As far as I can tell, I see no matching symptoms (and, indeed, from a quick test on -login your user account (magnus) /is/ able to write to the tool's home.

Have you logged out and back in after creating the group?  Remember that Unix groups are only set up upon login.
Comment 15 Magnus Manske 2013-06-08 13:25:31 UTC
I did that, and it still didn't work.

Now, I just let it sit there (logged in) for a while, and now it works. Maybe some permission cron job?
Comment 16 Marc A. Pelletier 2013-06-08 13:31:56 UTC
Well, the permissions do propagate at interval but should be frequent enough (60s) that it makes no practical difference.

There is almost certainly some amount of caching taking place at the NFS server level, however, which might cause a delay if the first attempt takes place before the permissions are propagated (i.e., it would "remember" you don't have access rights for a while until the cache expires).  This should normally self-correct within several minutes.

I have been unable to reproduce the problem, however, so I expect the "window of opportunity" might be relatively small.
Comment 17 Magnus Manske 2013-11-17 19:02:33 UTC
It's happening again (can't write to one of my tools' files as "magnus"), this time for the tool "magnus-toolserver". I'm in the group "local-magnus-toolserver"; file is g+rw; logged out, rebooted local machine. It's been a few hours, so...
Comment 18 Marc A. Pelletier 2013-11-17 23:16:19 UTC
root@tools-login:~# sudo -iu magnus
[snip motd]
magnus@tools-login:~$ touch /data/project/magnus-toolserver/test
magnus@tools-login:~$ ls -l /data/project/magnus-toolserver/test 
-rw-rw-r-- 1 magnus local-magnus-toolserver 0 Nov 17 23:15 /data/project/magnus-toolserver/test
magnus@tools-login:~$ 

I am unable to reproduce the problem.  Is there a specific file you are unable to write to?
Comment 19 Magnus Manske 2013-11-18 10:09:02 UTC
Works for me as well now. Thanks.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links