cannot create directory in /db/transactions/

2011-08-01 Thread Michael Chen

Dear there,

The user "svntest" has a ssh account on the server, and he executes this 
to show the permission of directory "transaction":

[svntest@chen src_ampl]$ ls -l /home/svn/spuc/db/
total 28
-rw-rwSr-- 1 chensy spuc8 Jul 30 16:02 current
-r--rwSr-- 1 root   spuc2 Mar 11 11:53 format
-rw-rwSr-- 1 root   spuc5 Mar 11 11:53 fs-type
drwxrwsr-x 2 root   spuc 4096 Jul 30 16:02 revprops
drwxrwsr-x 2 root   spuc 4096 Jul 30 16:02 revs
drwxrwsr-x 2 root   spuc 4096 Jul 30 16:02 transactions
-rw-rwSr-- 1 root   spuc   37 Mar 11 11:53 uuid
-rw-rwSr-- 1 root   spuc0 Mar 11 11:53 write-lock

he verifies that he is in the group "spuc":
[svntest@chen src_ampl]$ getent group spuc
spuc:x:505:chensy,zhaoming,svntest

yet, he can't create files in the directory "transaction":
[svntest@chen src_ampl]$ touch /home/svn/spuc/db/transactions/temp
touch: cannot touch `/home/svn/spuc/db/transactions/temp': Permission denied

so he double checked his umask too:
[svntest@chen src_ampl]$ umask
0002

all seem right, but he cannot write into the directory, why?

The system is CentOS 5.0.

Sincerely Yours,
Michael Chen


Re: cannot create directory in /db/transactions/

2011-08-03 Thread Michael Chen
just double checked /etc/selinux/config and found SELinux is disabled on 
my CentOS 5 by default.


It seems the system does not has Apparmor.

Reboot the system, and the problem went away. Now I can create directory 
in ../db/transaction.


Not sure what's the reason behind the scene.

--
All the best,
Michael Chen


cannot access folder though I have right

2011-09-14 Thread Michael Chen
Though I am a member of the group "shortfall", and there are group access
rights (rwS) for the folder db/rev/1, I cannot access it. I also have
disabled the SELinux totally to isolate the problem. May anyone tell me why
I cannot access the folder? Followings are the diagnostic info:

[chensy@chen working]$ ls -l /home/svn/shortfall/db/revs/
total 8
-rw-rwS--- 1 chensy shortfall  115 Sep 13 13:04 0
-rw-rwS--- 1 root   shortfall 2238 Sep 13 13:04 1

[chensy@chen working]$ more /home/svn/shortfall/db/revs/1
/home/svn/shortfall/db/revs/1: Permission denied

[chensy@chen working]$ whoami
chensy

[chensy@chen working]$ getent group shortfall
shortfall:x:525:chensy,lanhai

[chensy@chen working]$ su -
Password:
[root@chen ~]# sestatus
SELinux status: disabled


-- 
All the best,
Michael Chen


Re: cannot access folder though I have right

2011-09-15 Thread Michael Chen
Thanks Andreas.

Even if I logout and login manytimes, I still cannot access the folder.

However, after I reboot the CentOS5, I can access the folder.

I have to say, this immediately reminds me Windoze, where reboot is a must
for many scenarios.

Is there an explaination why a linux system needs reboot before the group
access right is allowed?

The script I wrote to create a new svn project is in the following. I always
su to root to execute this script since the commands groupadd and usermod
are root commands.

 scripte createproject.sh ==
#!/bin/sh -v
echo Usage: createproject projectname username1 [username1 username2
username3 username4]

if [ $# -gt 4 ]
then
echo too many parameters
exit 1
fi

if [ $# -lt 2 ]
then
echo too less parameters
exit 1
fi



svnadmin create /home/svn/$1

 groupadd $1
 usermod -a -G $1 $2
if [ $# -eq 3 ]; then  usermod -a -G $1 $3; fi
if [ $# -eq 4 ]; then  usermod -a -G $1 $4; fi



chown -Rv $2 /home/svn/$1

 chgrp -Rv $1 /home/svn/$1

 chmod -Rv g+rws /home/svn/$1

cd /tmp

svn checkout file:///home/svn/$1

cd $1
svn mkdir doc
svn mkdir paper
svn mkdir src_ampl
svn mkdir src_c
svn mkdir src_matlab

svn propset svn:ignore . -R -F ~/ignorelist
svn commit -m "created project"

cd ..

rm -fr $1


==

All the best,
Michael Chen


On Thu, Sep 15, 2011 at 2:53 AM, Andreas Tscharner <
andreas.tschar...@metromec.ch> wrote:

> > Subject: cannot access folder though I have right
> >
> > Though I am a member of the group "shortfall", and there are
> > group access rights (rwS) for the folder db/rev/1, I cannot
> > access it. I also have disabled the SELinux totally to
>
> Stupid question: Did you logout and login after you have added yourself to
> the shortfall group?
>
> Best regards / Freundliche Grüsse
> Wenzel Metromec AG
>Andreas Tscharner
> --
> Andreas Tscharner, Development
> Wenzel Metromec AG, Rheinfelsstrasse 1, CH-7007 Chur, Switzerland
> phone:  +41 (0)81 257 07 00
> fax:+41 (0)81 257 07 01
> e-mail: mailto:andreas.tschar...@metromec.ch
> www:http://www.metromec.ch
>
>
> Open House am 26. und 27.10.11
>
> Am 26. und 27. Oktober 2011 findet das Wenzel Metromec Open House in Chur
> statt.
> Tauchen Sie ein in interessante Fachreferate und Workshops.
> Besichtigen Sie topaktuelle Exponate aus dem Hause WENZEL.
> Erfahren Sie mehr über unsere Produkte und Dienstleistungen.
> Lernen Sie die neuste Version von Metrosoft QUARTIS kennen.
>
> Reservieren Sie sich das Datum.
> Das detailierte Programm folgt in Kürze.
>
>
>


-- 
All the best,
Michael Chen
Google Voice: (847) 448-0647 (Chicago number)