One could write a script that fetches the file list via FTP, generates an FTP script to run a 'site chmod' on each one, and the execute said FTP script. But for a one-shot thing that's probably overkill.
One question that I have to ask: why do you want to change the permissions to 755, making them executable? Isn't 644 (-rw-r--r--) enough?
As for your required script:
If anyone wants to expand this code with error checking and whatsnot, feel free to do so.
Just one doubt, correct me if am wrong,
shouldn't find be used with xargs instead of exec as there are more number of arguments churned out by find.
Hello!
At present, my .js files are also within the public_html directory.
Anyone is able to type the name of these files in their browser
address bar and then be presented the javascript (or text) code.
What numeric CHMOD should be applied to these, which: Permit
the world and group to... (3 Replies)
hello! is there a way for me to use the chmod command to change permissions for several files all at once -based on the fact that these files were all most recently modified TODAY ?
I can't use a wildcard on their filenames because the filenames are varied. But I was hoping I could somehow do... (2 Replies)
Is there a way to specify 774 permissions for a file uploaded to an app server via ftp without the users logging in and doing a chmod on the file they just put? I understand they were doing this with an old shared account, and it was working. When they started using their own accounts it stopped... (1 Reply)
hello,
i want to chmod 444 all files in a directory, files in subdirs cannot be chmoded same goes for the subdirs themself.
So using:
chmod -R 444 /dir/
won't work because it will chmod the directorys and files (together with files in subdirectorys)
I figured out how to chmod files... (1 Reply)
Hi,
OS - Unix, linux (all unix flavors)
My requirement. To check directory/file exists and then change the permission of the directories/files.
Iam trying to start with directory and here is my code in the file totalchange.sh (insideragain - is a directory, test1.txt - is a file under the... (2 Replies)
So i have about 600gb of data.. in which there are alot of directories and alot of files.. Im trying to put this on a ftp server.. So i want to set the permissions on the directories to be 755 and the permission on the files to be 644. So i used:
find . -type d -exec chmod 755 {}\;
and
find .... (6 Replies)
Hi all,
I have a script who generate as an output a lot of files (the number is highly variable : 500 to more than 10000).
At the end of this script I need to do a "chmod" on all those files. I tried
but it says
-bash: /bin/chmod: Argument list too long
So it seems that chmod can't... (9 Replies)
I am looking for a small script to crawl through several directories and change a couple of files in each directory to read write status.
Anyone have any ideas ? (5 Replies)
Hi,
I have a list of files in a text file. I want to change the mode of every one of those files, but am having difficulty in doing so.
#!/bin/bash
files=/home/david/files.txt
for $item in $files {
chmod 640 $item
}
.. doesn't cut it.
Can anyone help?
Thanks. (7 Replies)
Discussion started by: davidm123SED
7 Replies
LEARN ABOUT DEBIAN
gitaction
gitaction(1) General Commands Manual gitaction(1)NAME
gitaction - GNU Interactive Tools - per file type action script
SYNTAX
gitaction directory file
.gitaction directory file
DESCRIPTION
gitaction is a script that executes a different action for each file type specified. It is called by the gitfm program when pressing F2 or
^Xa (see the gnuitrc.TERM configuration files in the gnuit manual). The first parameter is the current directory name and the second one is
the file name to be matched against the default patterns. The matching is done using the shell 'case' statement. If you press F2 or ^Xa on
a *.html file, gitfm will invoke a browser to view it, if you press F2 or ^Xa on a *.tar.gz file, gitfm will list the tar archive contents,
if you press the same keys on a *.gz file, gitfm will display its uncompressed contents on the screen, etc ...
If you press F2 or ^Xa on a *.gif file or *.jpg file and you have the zgv utility installed, you will be able to see it. If you want to
change the gif/jpeg viewer, all you need to do is to change its name in the gitaction script.
There are many more file types and viewers that gitaction knows about. In addition, if you are running under GNOME, gnome-open is used,
and on MacOS, open(1) is used. see(1) and metamail(1) are also used as fallbacks.
If all else fails, the file is displayed using $GNUIT_PAGER. Feel free to change this. If you want to find out what the default action for
each file type is (or if you want to modify it), just read/modify the gitaction script.
The script can be easily enhanced. Just read it.
The .gitaction script is a local version of the gitaction script. When started, gitaction tries to search a script called .gitaction in the
current directory and, if it finds it, it starts it. If .gitaction's exit code is 0 ( .gitaction couldn't find a matching pattern), gitac-
tion starts its own case statement trying to match the current file name (the second parameter) against its default patterns.
The .gitaction script *must* be executable. An example of .gitaction can be found in the directory gitfm is installed into. (usually
/usr/local/bin or /usr/bin) Debian users can find it in /usr/share/doc/gnuit/examples/. You should copy the example to the current direc-
tory or your home directory and then modify it.
BUGS
Please send bug reports to:
gnuit-dev@gnu.org
SEE ALSO gitfm(1)gitps(1)gitview(1)gitmount(1)gitkeys(1)gitrgrep(1)gitunpack(1)AUTHORS
Tudor Hulubei <tudor@cs.unh.edu>
Andrei Pitis <pink@pub.ro>
Ian Beckwith <ianb@erislabs.net> (current maintainer).
gitaction(1)