Skip to main content

Posts

Showing posts from December, 2010

Changing File and Directory Permission en masse.

Running msec on one of my Mageia Linux machines turned up a number of world-writable files. These are potential security problems, especially on a machine that faces the Internet. The obvious solution was to use chmod to remove any world writable permissions.

But there's the problem. The chmod command has a recursive directive, -R, that would work except that it would change permissions on the directories as well. After all in *NIX, all directories are files.

Thanks to my friends at TWUUG, I discovered that the find command, used with its -exec directive could accomplish what I wanted.

find /xxx -type f -exec chmod o=-w {} + ;

Breaking this down:

find - the find command itself. Depending on what files you are modifying, you may need to be root.

/xxx - the path to where the files are located.

-type f - this tells find to look for files; type d would tell it to look for directories.

-exec - this directive tells find to execute the command that follows, in this case:

chmod - the command t…

A screen-like command for X applications

The screen command has been very useful for running programs on remote machines because you can detach the sessions and log out of the remote machine and the application is still running remotely.

It would be nice to do that with a graphical application since you can connect to a remote graphical application via X or VNC or similar applications, any graphical application terminates when you close the session.

That's changed with xpra. Connecting to an X server (the special Xvfb server, basically an X server minus any video drivers so it can run on a headless computer -- yes, X with no video card) as a compositing window manager on the remote computer allowing you to log in later (even from a third computer), re-attach the session and the program is still running.

The parent project that includes xpra is partiwm, a tiling window manager.

The current version of xpra has many enhancements from the version originally reported here.

Compiling and Installing on Mandriva Linux

To install…