Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Rename files... permission

Reply
Thread Tools

Rename files... permission

 
 
Adam Folkesson
Guest
Posts: n/a
 
      11-17-2009
Hello!

I'm trying to rename a couple of files. Here my code:

(0...files.size).each do |i|
File.rename(files[i], episodeList[i])
end

I get the error-messege "Permission denied - Permission denied - . or
S05 E09 - The Real Ghostbusters (Errno::EACCES)".

The directory is set so everyone can read and write. I can't come up
with what I'm suppose to do? I'm really grateful for help!
--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
 
 
 
Gennady Bystritsky
Guest
Posts: n/a
 
      11-17-2009

On Nov 16, 2009, at 8:22 PM, I=F1igo Medina Garc=EDa wrote:

>=20
>=20
>> I get the error-messege "Permission denied - Permission denied - . or
>> S05 E09 - The Real Ghostbusters (Errno::EACCES)".
>>=20
>> The directory is set so everyone can read and write. I can't come up
>> with what I'm suppose to do? I'm really grateful for help!

>=20
> Files are also setted to 777 permissions?


In UNIX, rename changes the directory, so file permissions do not matter --=
a file inode is not even looked in, let alone modified.

Gennady.=

 
Reply With Quote
 
 
 
 
Adam Folkesson
Guest
Posts: n/a
 
      11-17-2009
Sorry, I meant that I've setted the files to 777 as well.
--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
 
 
Reply

Thread Tools

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 On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Fixed: The machine-default permission settings do not grant Local Activation permission for the COM Server application with CLSID {555F3418-D99E-4E51-800A-6E89CFD8B1D7} to the user NT AUTHORITY\LOCAL SERVICE SID (S-1-5-19). Skybuck Flying Windows 64bit 1 06-29-2009 06:17 PM
Intermittent "permission denied" errors when using os.rename and a recently deleted path?? Russell Warren Python 4 07-27-2006 09:43 PM
Firefox Bookmark Rename and Thunderbird NG Questions Teather Mitty Firefox 4 12-26-2004 12:36 AM
New To Perl :- Help with "rename" and "File locking" Hugz Perl 3 02-25-2004 06:21 AM
Re: Best route to Rename a Domain.... Laura A. Robinson MCSE 0 09-19-2003 02:31 PM



Advertisments