28 Feb, 2007  |  Posted by Danesh  |  in Linux

” -bash: /usr/bin/crontab: Permission denied “.

I was getting this error earlier today while trying to add cron jobs for my login on my SLES 10 box at work. Turns out that all users in SLES 10 by default have no access to cron.

The fix is to add the user to the “trusted” group in the group file (/etc/group). Let’s assume mu login is “elf”.

1. Make sure you are “root”.

2. #usermod -G trusted elf
This will add the user to the “trusted” group.

3. #id elf
Display groups the user belongs to. Make sure “trusted” is on the list too.
The output might look like this. “uid=502(danny) gid=502(users) groups=502(elf),11(trusted)”
4. #su - elf
Change user

5. #crontab -e
Add/Remove/Edit user cron jobs.

6. #crontab -l
List user scheduled cron jobs

Please do comment if you have an alternative way to accomplish this or if I made a mistake.

26 Feb, 2007  |  Posted by Danesh  |  in Linux

When you run commands and programs in a command prompt on Linux, the programs or commands only run while the command prompt session is open but as soon as the command prompt session is terminated for whatever reason, the commands or programs running within the command prompt session will also get terminated.

I use wget to download files from the internet using my putty console all the time. Imagine downloading a 500mb file and then suddenly putty crashes causing my session to terminate along with it. There goes my 500mb file download!! I so wished I had known about the “Screen” program then.

The screen program is a magnificent utility. Screen basically starts a session within the the session that you logged in with. So, if your putty session suddenly crashed don’t worry, the screen session would still be running in the background. Log in again to the server using putty and you should be able to retrieve the screen session you initiated earlier.

# screen

This starts a screen session.

# Ctrl + A followed by D

This will detach your screen session and return you to the original session you logged in with. Your screen session will now be running in the background.

# screen -r

This command will resume your previous screen session.

# Ctrl + A followed by Ctrl + \(back slash)
# exit

You could run either command above to end a screen session.

# Ctrl + A followed by “

This command will list all the available screen sessions running if there are.

Usefull Links:
O’REILLY Linux Command Directory

Inside Open Source

22 Feb, 2007  |  Posted by Danesh  |  in Site News

http://alanbernard.com/binations/Just put up my new banner curtosy of my best pal Alan Bernard. He’s got tallent and an upcoming star in art so make sure to check his site “http://alanbernard.com/binations/” for new stuff.

I had a post up about his Ts before. Check it out.

22 Feb, 2007  |  Posted by Danesh  |  in Linux

A short introdution to name pipes as I see them.

In the Linux world name pipes are typically used to permit communications between 2 unrelated processes. Name pipes are also known as FIFOs (first in, first out), normally used to establish a one-way flow of data.(half-duplex). Name pipes have a path name of a file associated with them, this is how calling process will reference the name pipes.

Name pipes are file system persistent objects. What this means is that name pipes are always available till the time they are explicitly deleted from the file system as they are represented by as standard files on the file-system. As for standard pipes that we religiously use in our day to day Linux life also known as anonymous pipes are process persistent objects meaning that the name pipes are removed as soon as the processes no longer use them.

What does mkfifo do

mkfifo is used to create a FIFOs(name pipe). “mkfifo test-pipe”, now we have a name pipe called “test-pipe”.

“ls > test-pipe”, this pipes the output of the ls command into the name pipe “test-pipe”.

“cat name-pipe | while read line i; do rm -f $i; done” this will delete the files passed. At this point the “test-pipe” will be empty. “cat test-pipe” will come up blank.

I’ve added a screen-shots of the above in action on the next page. Check it out.

I’m not a Linux guru yet, so guys if my information not accurate or if there is a better way to improve my example please feel free to comment.

Continue Reading ->

22 Feb, 2007  |  Posted by Danesh  |  in WordPress

wp-2.0-square-button.gifWordPress 2.1.1 and 2.0.9 were released yesterday. Bugfixes for 2.1.1, 30 in total and secuity fixes for 2.0.9. The fixes in 2.1.1 are centered around encoding, XML-RPC, object cache and th eHTML code itself wherelse in 2.0.9 the fixes were to prevent XSS which is commonly known as cross-site scripting.

Download WordPress 2.1.1 from wordPress and WordPress 2.0.9 from the release archive section.

Installation guide.
Upgrade guide.
** The Danesh Project has been upagraded and currently running WordPress 2.1.1 **

Original post on WordPress.org