[Expo-tech] We can push anything to expoweb.

Wookey wookey at wookware.org
Sat Mar 28 04:39:12 GMT 2020


On 2020-03-27 23:26 -0000, Philip Sargent (Gmail) wrote:
> Can someone fix this?

OK. fixed - well, partly.

The issue was that files need to be owner expo, group
www-data and both owner and group read/write, and instead they were
nearly all owned by www-data rather than expo. At least one file
handbook/computing/x-todo-styles.css was owned by root

Fix that and then I am able to resolve the
handbook/computing/x-todo.html file 

One version has mixed DOS/unix linefeeds (DOS in first 4 and last 2
lines - i.e body/header). Be careful to use editors smart enough to
never let you do this (accidentally).

Hmm. Took a while to work out I was in vimdiff which I don't know how
to drive, and I'm failing to get it to use ediff (which I do, sort
of), and now it's after 4am, so this will have to wait till tomorrow
evg.

Did you mean to delete
years/2010/accounts/? but not commit the change? or is that a mistake?
(on the server)

> We can push anything to expoweb.

Do you mean 'can't' here?
> 
> I changed the ownership and group ownership of the relevant directory to
> 
> www-data:www-data
> 
> It succeeded.

This should be expo:www-data, and is probably where things started to go wrong.

Or possibly we should do this the other way round and have group expo,
then we could add users like you and me to the group and we should be
able to edit in-place.

> Then I tried to do the hg commit thing, so that my new page went into
> 
> mercurial.
> 
> I found a whole load of un-updated files -- all due to me pushing stuff to
> 
> mercurial without doing hg update
> 
> BUT when I tried to do hg update I got this:
> 
> 
> update failed to remove photos/wook91.jpg: Permission denied!
> 
> update failed to remove photos/wookey.jpg: Permission denied!

because you had changed the permissions so that only 'www-data'
(i.e. apache) could do this.

>  
> 
> So I tried
> 
> expo at expo:~/expoweb$ su psargent
> 
>  
> 
> psargent at expo:/home/expo/expoweb$ hg update
> 
> not trusting file /home/expo/repositories/hg/expoweb/.hg/hgrc from
> 
> untrusted user expo, group expo
> 

> abort: could not lock working directory of
> 
> /home/expo/repositories/hg/expoweb: Permission denied

psargent does not have permission to do this. If we made everything
group expo and added that user to group expo then I expect it would
work.

> 
> It shouldn't require sudo to do this surely ?

No, and indeed doing so will give any new files 'root' owernship which
will also break things.

> There is something  funny going on with expoweb/years/2010/accounts too:

yes. All those files have been deleted, but not removed from the
VCS. Probably a mistake and they should just be checked out again.

> expo at expo:~/expoweb/years/2010/accounts$ ls -tlA
> 
> total 24
> 
> drwx--S--- 2 www-data www-data 4096 May 25  2016 config
> 

Wookey
-- 
Principal hats:  Linaro, Debian, Wookware, ARM
http://wookware.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.wookware.org/pipermail/expo-tech/attachments/20200328/f0cfed66/attachment.sig>


More information about the Expo-tech mailing list