# Creating a directory

**URL:** <https://rubytalk.org/t/creating-a-directory/10792>\
**Category:** ruby-talk\
**Created:** [29 March 2004 20:07 UTC](https://rubytalk.org/t/creating-a-directory/10792 "2004-03-29T20:07:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Paul\_Vudmaska](https://avatars.discourse-cdn.com/v4/letter/p/c2a13f/32.png) [@Paul\_Vudmaska](https://rubytalk.org/u/Paul_Vudmaska)\
**Post date:** [29 March 2004 20:07 UTC](https://rubytalk.org/t/creating-a-directory/10792/1 "2004-03-29T20:07:12Z")

</div>

Unix / 1.6

I’m trying to allow clients to create directories for uploading files  
from the web using this command…  
Dir.mkdir(PATH + sFolderPath + folder,0007)  
^^^^

It creates the directory but when i try to write to the directory I get  
a permission denied error. Is’nt 0007 read / write and execute for everyone?

I cant even get into the dir with ssh. But i can delete it with an ftp  
client. hmmmm…

What am i doing wrong?

Thanks, Paul

---

<div class="post-metadata">

**Author:** ![Andre\_Nathan](https://avatars.discourse-cdn.com/v4/letter/a/e56c9b/32.png) [@Andre\_Nathan](https://rubytalk.org/u/Andre_Nathan)\
**Post date:** [29 March 2004 20:16 UTC](https://rubytalk.org/t/creating-a-directory/10792/2 "2004-03-29T20:16:34Z")

</div>

No, it’s read/write/execute for _others_. If you are the owner of the  
directory, “others” doesn’t include you.

HTH,  
Andre

> **···**
>
> On Mon, 2004-03-29 at 17:07, Paul Vudmaska wrote:
> 
> > Is’nt 0007 read / write and execute for everyone?

---

<div class="post-metadata">

**Author:** ![Edgardo\_E\_Hames](https://avatars.discourse-cdn.com/v4/letter/e/b5e925/32.png) [@Edgardo\_E\_Hames](https://rubytalk.org/u/Edgardo_E_Hames)\
**Post date:** [29 March 2004 20:17 UTC](https://rubytalk.org/t/creating-a-directory/10792/3 "2004-03-29T20:17:47Z")

</div>

Paul Vudmaska wrote:

> Unix / 1.6
> 
> I’m trying to allow clients to create directories for uploading files  
> from the web using this command…  
> Dir.mkdir(PATH + sFolderPath + folder,0007)  
> ^^^^
> 
> It creates the directory but when i try to write to the directory I get  
> a permission denied error. Is’nt 0007 read / write and execute for  
> everyone?

0007 is read/write for everyone but the owner/group  
What you probably want is 0700 (R/W for the owner).

Cheers.  
Ed

> **···**
>
> –  
> Edgardo Hames  
> Vates S.A. Ingeniería de Software  
> Consultor Informático
> 
> [ehames@vates.com](mailto:ehames@vates.com)  
> Tel: +54 +351 +4240133 int. 121  
> 9 de Julio 228 - 6° piso. Córdoba

---

<div class="post-metadata">

**Author:** ![Paul\_Vudmaska](https://avatars.discourse-cdn.com/v4/letter/p/c2a13f/32.png) [@Paul\_Vudmaska](https://rubytalk.org/u/Paul_Vudmaska)\
**Post date:** [29 March 2004 22:06 UTC](https://rubytalk.org/t/creating-a-directory/10792/4 "2004-03-29T22:06:03Z")

</div>

Edgardo E. Hames wrote:

> Paul Vudmaska wrote:
> 
> > Unix / 1.6
> > 
> > I’m trying to allow clients to create directories for uploading files  
> > from the web using this command…  
> > Dir.mkdir(PATH + sFolderPath + folder,0007)  
> > ^^^^
> > 
> > It creates the directory but when i try to write to the directory I  
> > get a permission denied error. Is’nt 0007 read / write and execute  
> > for everyone?
> 
> 0007 is read/write for everyone but the owner/group  
> What you probably want is 0700 (R/W for the owner).
> 
> Cheers.  
> Ed

Using 0700 worked , Thank you! I thot ‘others’ would be what i needed  
because i’m doing this from the web and so I’m not authenticating(  
accept with a database and sessions). Now i cant delete the dirs from  
the command line(ssh). Or from ftp (wftp[interestingly, it shows _All  
privs_ when i view chmod] and win explorer(xp)[which shows all privs for  
‘owner’ - what i’d expect]. What group did i write it with? Do i have to  
delete the dirs from the web as well?? Now, it appears, ‘the web’ is the  
owner - i cant change anything with the dir. Anyone do something  
similar(allowing users to upload files and create dirs) I guess what i  
need is ‘all’ users and will just cross my finders…i’m making sure the  
files are only images.

thanks, :clueless
