[SOLVED] FTP: recursive chmod (separate for directories and files)
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Recently, I had to change the names of around 500 files on a few dozen devices with an ftp network interface.
I cut and pasted the directory listing to a file, and then used sed to extract the file names I needed to work with. This created a script of ftp commands. Using linux you can run a script by redirecting a file.
In my case, I needed to perform this on a number of machines so the last command was 'bye'. Then the line above could be placed in a for loop, where I used a variable for the last IP number.
Originally posted by Kahless most ftp clients will chmod recursivley by default, so it could be trickey to make the file one thing and the directories somthing else.
why do you need to do this?
If you want to allow uploading, but not allow changing of files, it would be easier and safer to have a seperate upload directory
You need this if you want to setup a CMS or Wiki or discussion board or any other piece of software which is configured through a webinterface. For this to work, you usually have to make the config directory and all files in it world writable and you don't want to chmod 150 files in 20 different (sub-)folders by hand, trust me.
I'm using gFTP and it doesn't chmod recursively and it's a major pain in the back. So is there any Linux FTP client which can chmod recursively? It's not true that most of the ftp clients do it automatically, I don't know one which actually does, because 90% of the Linux ftp clients are frontends to 'ftp' and 'ftp' doesn't chmod recursively, at least not by default.
Yep, that's the best one can do right now. Still I think it would be more than just a nice feature to have a recursive chmod command in e.g. gFTP (which I'm using exclusively). I wonder why this isn't a standard feature of ftp clients, it can't be that hard to implement since the chmod command itself already has this option!
the unix chmod command has this, but not the one in the ftp server called by SITE CHMOD.
But as clients have features for recursive copying etc., it wouldn't be a problem to implement recursive chmod, ls, etc.
You can chmod recursively by right-clicking on an item (or multiple items) and choosing "Settings" - Now a settings dialogue appears. Click on "Rights" - now you can select all options you like - don't forget about the checkbox "apply to all subfolders and their contents".
After clicking on OK, a status dialogue appears that only says "logon successful" - simply wait for some time until it disappears and the rights have been changed.
(Sorry, I don't know the exact english texts - if someone could look them up for me, it would be nice.)
If someone has other experiences, please write back.
I just used Konqueror to change file permissions recursively [to any depth] on my laptop and it works very well...
the regular Linux file browser only does it to the immediate folder contents... CHMOD with -R only applies changes to the immediate folder contents...
I was looking for a tool that would apply the changes to all subordinate files and folders... and Konqueror did it very quickly & easily...
Thank you for the hint, J.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.