win32-file set_permissions

D

Dave Smith

[Note: parts of this message were removed to make it a legal post.]

Hi,


In the current version, it means the given account do not exist.
The misleading message must be modified.

Inserting the following line at file.rb #158 will solve this problem.

if sid.strip == ""
raise ArgumentError, 'Account does not exist'
end


Try this:

perm = File.get_permissions("C:\\foo.txt")
p perm
File.set_permissions("C:\\foo.txt",perm)

Regards,
Park Heesob


Thanks for your help. It looks like some strange things are happening.
When I do the above where I get, then set the permssions on my local drive
it works fine. When I do it on a mapped drive I get the account not found
error after inserting the code above. However, if I try to add a domain
account permissions to the file then it doesn't give an error, but it
doesn't add the permissions either.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
474,206
Messages
2,571,068
Members
47,674
Latest member
scazeho

Latest Threads

Top