Koozali.org: home of the SME Server

BUG: bad permissions in ibay subdirectories

Hasan Muhammad

BUG: bad permissions in ibay subdirectories
« on: July 25, 2000, 10:14:26 PM »
1) admin created an ibay called 'it'
--group: it_g
--write=group, read=group
--local network access

2) From w98, user1 (of group it_g) created a new 1st level directory in the 'it' ibay

3) From w98, within the above 1st level directory, user1 (of group it_g) created a new 2st level directory and a new file

4) From w98, user2 in the same group tried to copy the newly created file from the 1st level directory and received the following error message
'cannot copy file: Access is denied'

4) From login on e-smith server, root observed within the 1st level directroy that the the newly created file and 2nd level directory ownerships were as
owner = user1
group = user1

BUG: I believe e-smith should have created the new file and 2nd level directory ownerships as follows:
owner = user1
group = it_g

Is there any known solution?

Hasan

Charlie Brady

RE: BUG: bad permissions in ibay subdirectories
« Reply #1 on: July 26, 2000, 08:43:35 PM »
Hasan Muhammad wrote:

> BUG: I believe e-smith should have created the new file and 2nd
> level directory ownerships as follows: owner = user1 group = it_g

Correct. The new directory should have been created with setgid permission, which would have set the group correctly.

> Is there any known solution?

We are working on an update RPM which will fix this problem.

There is also a workaround that you can implement immediately. Go into the i-bay modify  screen in the e-smith manager, choose "Modify" for the ibay with the new subfolder with incorrect permissions, then don't change any settings, but hit the "Modify" button. That will put the correct permissions and group ownership on all files and folders in the ibay.

I'll let people know here and on the developers mailing list when we have an updated RPM available.

Regards

Charlie

Hasan Muhammad

RE: BUG: bad permissions in ibay subdirectories
« Reply #2 on: July 28, 2000, 04:57:40 AM »
Great! That work-around worked.

I extrapolated it as follows so I would not have to manually moniter the creation of new directories and files by users.

Modified /etc/crontab by adding the following line...

 * * * * * root run-parts /etc/cron.minutely

Added the directory/file /etc/cron.minutely/ibayDirWatch with content as follows...

find /home/e-smith/files/ibays/*/* -maxdepth 0 -exec chgrp -R --reference {} {}
; > /dev/null
find /home/e-smith/files/ibays/*/* -type d -exec chmod g+s {} ; > /dev/null


Of course these files should be modified or added using the e-smith templates and customization techniques.

Hasan

Hasan Muhammad

RE: BUG: bad permissions in ibay subdirectories
« Reply #3 on: July 28, 2000, 07:01:34 AM »
Forget the cron based work-around.

Use Charlie's as described below.

However, beware that any /etc/e-smith/web type modifications could be blown away.

Here's Charlie's solution...

Author: Charlie Brady
Date:   07-26-2000 19:10

Hasan Muhammad wrote:

> BUG: I believe e-smith should have created the new file and 2nd
> level directory ownerships as follows: owner = user1 group =
> it_g
>
> Is there any known solution?

Please try the update RPM at:

ftp://ftp.e-smith.net/pub/e-smith/e-smith-4.0/updates/RPMS/noarch/

The file is:

e-smith-base-4.0.12-28.noarch.rpm

Download this file, then apply it using:

rpm -Uhv e-smith-base-4.0.12-28.noarch.rpm
/sbin/e-smith/signal-event console-save

then reboot the server.

You will still need to repair any ibays which have incorrect permissions using the workaround which I gave you yesterday.

Please let me know whether this fixes your problem.

Charlie