Is there a way to give public access to directory?

This is a discussion on Is there a way to give public access to directory? within the Linux Security forums, part of the System Security and Security Related category; Anna Cunningham <anna@cunniingham.net> writes: [...] > I created a 2G file using dd for the fake partition, ...


Go Back   Usenet Forums > System Security and Security Related > Linux Security

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #11 (permalink)  
Old 02-06-2004
J.D. Ripper
 
Posts: n/a
Default Re: Is there a way to give public access to directory?

Anna Cunningham <anna@cunniingham.net> writes:

[...]

> I created a 2G file using dd for the fake partition, then mounted the file
> as a block device using the loopback device.
>
> dd if=/dev/zero of=/home/_file bs=1k count=2000000 losetup
> /dev/loop7 /home/_file
> mke2fs -cj /dev/loop7 2000000
>
>
> Then I mounted it in my /etc/fstab like this:
>
>
> /home/_file /mnt/LModels ext3 loop=/dev/loop7 0 0
>
> It mounts just fine. The problem is that only root can write to it. I
> tried adding 'user', 'users', to the options but it made no difference. I
> also tried setting chmod a+rw on /mnt/LModels, /home/_file, and chgrp
> users on the same, but nothing will give individual users access to the
> directory.
>
> My ultimate goal would be to apply umask=0002 to the mount so that I would
> end up with a mount point which had public access for all members of the
> users group without messing up their individual umask settings. But umask
> is not a valid option when loop= is used on a mount. I also tried setting
> gid=100 in the hopes it would figure out it was accessible by members of
> groups, but, again, gid is not a valid option.
>
> Does anyone know if there is a way to open up access to this mount?


My bad -- I should have looked into this a little more myself before
posting. I can't figure out how to get it to behave the way you want,
either.

Anyone?
Reply With Quote
  #12 (permalink)  
Old 02-07-2004
Jeff
 
Posts: n/a
Default Re: Is there a way to give public access to directory?


>> I created a 2G file using dd for the fake partition, then mounted the
>> file as a block device using the loopback device.
>>
>> dd if=/dev/zero of=/home/_file bs=1k count=2000000 losetup
>> /dev/loop7 /home/_file
>> mke2fs -cj /dev/loop7 2000000
>>
>>
>>


> My bad -- I should have looked into this a little more myself before
> posting. I can't figure out how to get it to behave the way you want,
> either.
>
> Anyone?



No - not at all! Your idea was great! It just took a little fooling around
to get the permissions set right. I ended up using this line to mount it:

/home/_file /mnt/loopdir ext3 rw,loop=/dev/loop7 0 0

I also had to:

chmod g+w /home/_file /mnt/loopdir
chgrp users /home/_file /mnt/loopdir /dev/loop7

Probably all of those weren't necessary, but I haven't gone through the
process of elimination to figure out what's critical yet.

Thanks for suggesting the solution. I learned something new.

-Jeff

Reply With Quote
  #13 (permalink)  
Old 02-07-2004
jack
 
Posts: n/a
Default Re: Is there a way to give public access to directory?

Jeff wrote:
> No - not at all! Your idea was great! It just took a little fooling around
> to get the permissions set right. I ended up using this line to mount it:
>
> /home/_file /mnt/loopdir ext3 rw,loop=/dev/loop7 0 0
>
> I also had to:
>
> chmod g+w /home/_file /mnt/loopdir
> chgrp users /home/_file /mnt/loopdir /dev/loop7
>
> Probably all of those weren't necessary, but I haven't gone through the
> process of elimination to figure out what's critical yet.
>
> Thanks for suggesting the solution. I learned something new.


When You're done with all that, would You be kind enough to post a
brief summary here (once You made an expert on that of Yourself)...?

In particular, I'd be interested in how Your umasks look like and
what group (other than users) files are created with. Remember that,
initially, that was the basic question. So, can You assign this mount
to one specific group, put the users in question into that group and
have files created with that group by default, implying "000?" as
umask? Or, as You wanted to do, leave the users' umasks unchanged and
have permissions set to "0770" on newly crated files on that mount?


Thanks in advance, Jack.

--
----------------------------------------------------------------------
My personal reading of the string "MicroSoft" expands to "NanoWeak"...

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 12:04 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0