Forum: Ruby on Rails chmod

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Nhila D. (Guest)
on 2006-06-11 08:42
hi everybody, after some time dealing with file upload finally i have my
scvript working, the problem its that seems that the files are uploaded
with 600 permissions and i need to be 644 to be accesible to everyone.

So i tried to change the permisions of the files inside the folder where
are saved the uploaded files, i have this on the index action of my
controller so at fisrt time change the permissions when needed:

Dir["/public/images/publics/*"].each {|f| FileUtils.chmod(0664, f)}

But doesnt seems to work, no error or warnings and the files remains
with the old permissions and i have to change it manually by ftp, if
someone can give me a hand with how to change permissions inside a
folder from a controller ill be very happy and your help will be very
appreciated cause i have tried a lot and i cant make it work :(
Nhila D. (Guest)
on 2006-06-11 23:18
Anyone? im stuck with this by 4 days now, i cant find a working example
in how to change file permissions, really if someone can help with this
ill be very very thankful.

Nhila :)
Tom M. (Guest)
on 2006-06-11 23:38
(Received via mailing list)

The second major entry should get you where you're going.

Is it possible you spent 4 days without using Google?

If so let me humbly recommend that you pull the Google
trigger sooner next time.

-- Tom M.
This topic is locked and can not be replied to.