Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

www.satindersingh.com

Here is the solution

find . -type d -perm 777 -exec chmod 755 {} \; (for changing the directory permission)

find . -type f -perm 777 -exec chmod 644 {} \; (for changing the file permission)
martin

Rene wrote:

I automaticaly upload files from a Windows-folder to a Unix-folder because the files are updated in Windows and than ditributed with an Unix-HTTP-Server.
And sometimes i backup those files and burn them on CD.
Now i want to restore the Data and restore them to the Unix machine which could be problematic cause data on CD is read-only.
This means i must set all folders to 755 and oll files to 644.
And to be sure, i want to include this command in my upload-files-script.

Any idea how to do this?

Wouldn't it help if you disable Preserve read-only option?
Rene

Think she wanted to do what's my problem now.

I automaticaly upload files from a Windows-folder to a Unix-folder because the files are updated in Windows and than ditributed with an Unix-HTTP-Server.
And sometimes i backup those files and burn them on CD.
Now i want to restore the Data and restore them to the Unix machine which could be problematic cause data on CD is read-only.
This means i must set all folders to 755 and oll files to 644.
And to be sure, i want to include this command in my upload-files-script.

Any idea how to do this?
martin

claudioerba wrote:

Any idea to perform the same operation in another way?

Still I'm really not sure what you want to do. Please try to explain it in words, not in commands.
claudioerba

-d means "do operation only to directory" -f "do operation only to files", but seems that the information that i found on some webpage (that i can't retrieve) is not correct.

Any idea to perform the same operation in another way?
Claudio
martin

Re: Chmod only files or only directory

First of all, this is not about WinSCP. It is a remote server (or rather shell) that evaluates your commands. Moreover I never header about -d option for chmod. What it should do?
Guest

Re: Chmod only files or only directory

martin wrote:

What error?


Hello Martin,
System say

Command 'chmod 777 -d "doceboCore/addons/calendar/README"'
failed with return code 1 and error message
chmod: invalid option -- d
Try `chmod --help' for more information..

seems that -d and -f options are not supported, does exist an alternative way for chmod recursively only files and only directories?

Regards
Claudio
martin

Re: Chmod only files or only directory

What error?
claudioerba

Chmod only files or only directory

Hello to all, i'm tryng to chmod only files or only directory, i run the followoing commands:

chmod 777 -d "!"

chmod 777 -f "!"

and i need it recursively,. the system disply me errors, what is the right instruction?
Regards
Claudio