Skip to content
Advertisement

Running Perl script accidentally locked a folder

I have a Perl script which has the following code

JavaScript

Upon running this script, I am unable to access the current folder (and open this script of course) anymore. When seeing the folder in Konqueror, there is an additional lock in the folder icon. Can anyone tell me what happened and how can I undo this?

I have checked the permission of this folder, apparently it was changed to d---------. I have solved this problem by resetting the permission, yet it would be great if anyone could explain why this happened. Thanks.

Advertisement

Answer

I think you’re confusing the ‘chmod’ shell command with the ‘chmod’ perl function. The latter takes a single list as a parameter the first element of which must be the numeric code experessed in octal. From perldoc -f chmod ;

JavaScript

The former – that is, the shell – has a -R switch. See man chmod for details.

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement