# Uploading and file permissions on XP

**URL:** <https://www.ruby-forum.com/t/uploading-and-file-permissions-on-xp/89152>\
**Category:** Rails\
**Created:** [March 17, 2007, 9:30pm UTC](https://www.ruby-forum.com/t/uploading-and-file-permissions-on-xp/89152 "2007-03-17T21:30:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![stiv](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/6f9a4e/32.png) [@stiv](https://www.ruby-forum.com/u/stiv)\
**Post date:** [March 17, 2007, 9:30pm UTC](https://www.ruby-forum.com/t/uploading-and-file-permissions-on-xp/89152/1 "2007-03-17T21:30:08Z")

</div>

I’m trying to do a simple file (image) upload and I’m running into  
trouble with permission to upload the file

System: XP  
User staus: local admin  
Rails env: Instant rails w/Mongrel (vanilla setup)  
local site [www.sgm.com](http://www.sgm.com) (host file setup  
local port 3010  
apache modifed to proxy (per instant rails setup)

I’ve added a directory called “media” under the public directory in my  
application

in my npicture.rb  
…  
File.open(“#{RAILS\_ROOT}/public/media/#{@filename}”, “wb”) do |f|  
f.write(@temp\_file.read)  
end  
…

When I run this I get  
Permission denied - C:/InstantRails/rails\_apps/SGM/public/media/

When I look at file/folder properties the attributes are set to  
read-only and the system does not respect a change to that check box and  
I’ve set all users on the system to have full controll of the  
InstantRails directory and all subdirectories - still shows read only)

Could there be some tweaking necessary to the apache config (perhaps a  
Directory element in the VirtualHost element) for the site which is more  
then just the vanilla?

I usually develop on OSX but I’m stuck and a win box for the next couple  
of weeks. Part of me wants to just say “stupid windows” and just wait  
until I can get back to my Mac…
