LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 01-04-2008, 12:45 PM   #1
popowich
Member
 
Registered: Nov 2004
Location: Rochester, New York
Distribution: RHEL7
Posts: 53

Rep: Reputation: 15
Can not create numerical directories


Hello,

I ran into an interesting problem yesterday that I as of yet have not been able to solve. I can not create numerical directories on my server anymore. It was a RHEL3 server. I had not made any changes to it. No patches or anything, it stopped working for no particular reason. I can not "mkdir 123", and I can not mkdir abc and then move it to 123. A mkdir abc123 works. This causes a significant for a server with a qmail queue, or software such as vBulletin and it'd addon products that use numerical directory names such as attachments/1/2/3. I did some googling and came up with a few other people who had this problem for example here and here . The problem exists on all file systems. The file systems are ext3. The problem is still there if I mount them ext2. The problem is still there if I recreate the ext3 journals via tunefs. The problem is still there if I fsck. The problem is still there if I reboot. My mkdir is unmodified, confirmed by rpm, and I don't have any aliases for mkdir. I had to get this working eventually so today I am upgrading to RHEL5. That worked for one person in the threads linked above,m at least long enough to be working and get migrated to a new server. Any thoughts? I'd love to hear a solution to this problem that does not involve reinstalling / upgrading the operating system.

-Raymond
 
Old 01-04-2008, 01:10 PM   #2
popowich
Member
 
Registered: Nov 2004
Location: Rochester, New York
Distribution: RHEL7
Posts: 53

Original Poster
Rep: Reputation: 15
The problem still exists after the upgrade to RHEL5.

Any ideas on what to check now?

-Raymond

Last edited by popowich; 01-04-2008 at 01:27 PM.
 
Old 01-04-2008, 02:00 PM   #3
popowich
Member
 
Registered: Nov 2004
Location: Rochester, New York
Distribution: RHEL7
Posts: 53

Original Poster
Rep: Reputation: 15
Here are some examples now that the server is back up...

Quote:
{2:59pm popowich@holdems /tmp/numbers} ls -la
total 40
drwx------ 2 popowich users 4096 Jan 4 14:59 .
drwxrwxrwt 19 root root 32768 Jan 4 14:59 ..

{2:59pm popowich@holdems /tmp/numbers} mkdir 0
mkdir: cannot create directory `0': No such file or directory

{2:59pm popowich@holdems /tmp/numbers} mkdir 123
mkdir: cannot create directory `123': No such file or directory

{2:59pm popowich@holdems /tmp/numbers} mkdir abc123

{2:59pm popowich@holdems /tmp/numbers} mkdir abc

{2:59pm popowich@holdems /tmp/numbers} mv abc123 9
mv: cannot move `abc123' to `9': No such file or directory
-Raymond
 
Old 01-04-2008, 02:20 PM   #4
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Does your locale do something strange with numbers?
 
Old 01-04-2008, 02:24 PM   #5
popowich
Member
 
Registered: Nov 2004
Location: Rochester, New York
Distribution: RHEL7
Posts: 53

Original Poster
Rep: Reputation: 15
I don't believe so:

Quote:
{3:23pm popowich@holdems ~} locale
LANG=en_US.UTF-8
LC_CTYPE="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_COLLATE="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_PAPER="C"
LC_NAME="C"
LC_ADDRESS="C"
LC_TELEPHONE="C"
LC_MEASUREMENT="C"
LC_IDENTIFICATION="C"
LC_ALL=C
 
Old 01-04-2008, 03:02 PM   #6
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
The error you are seeing will often be displayed if there is a permissions or selinux problem. However you demonstrated creating a directory with a normal name.

I'm just curious. Enter:
set 123
echo $1

Also, as a regular user try
mkdir ~/123

Does that fail as well?

Last edited by jschiwal; 01-04-2008 at 03:04 PM.
 
Old 01-04-2008, 03:09 PM   #7
popowich
Member
 
Registered: Nov 2004
Location: Rochester, New York
Distribution: RHEL7
Posts: 53

Original Poster
Rep: Reputation: 15
Correct, it is not a simple permissions issue.

Here is an example, as root, across multiple partitions:

Quote:
[root@holdems popowich]# cd /

[root@holdems /]# mkdir 0
mkdir: cannot create directory `0': No such file or directory

[root@holdems /]# cd /usr/local

[root@holdems local]# mkdir 123
mkdir: cannot create directory `123': No such file or directory

[root@holdems local]# cd /var/log

[root@holdems log]# mkdir 456
mkdir: cannot create directory `456': No such file or directory

[root@holdems log]# touch 678
touch: creating `678': No such file or directory
The following works as root:

Quote:
[root@holdems tmp]# set 123
[root@holdems tmp]# echo $1
123
But not as a non-root user:

Quote:
{4:08pm popowich@holdems ~} set 123
set: Variable name must begin with a letter.

And the relative path mkdir fails too:

Quote:
{4:08pm popowich@holdems ~} mkdir ~/123
mkdir: cannot create directory `/home/popowich/123': No such file or directory
I'm not sure if this is where you were trying to go, but this fails too:

Quote:
[root@holdems tmp]# set 123
[root@holdems tmp]# echo $1
123
[root@holdems tmp]# mkdir $1
mkdir: cannot create directory `123': No such file or directory

Last edited by popowich; 01-04-2008 at 03:21 PM.
 
Old 01-04-2008, 03:34 PM   #8
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
The set command will set the argument array:
Code:
set 123 ab 321
jschiwal@hpamd64:~> echo "$@"
123 ab 321
I did this as a normal user. I wanted to see if the argument showed up the same when you echoed it later.

I just noticed that you are doing something funky with PS1. Use the systems settings for PS1 and PS2 and see if that makes a difference.

As a normal user on SuSE my PS1 is
$(ppwd \l)\u@\h:\w>

On Fedora Core it is:
[\u@\h \W]\$

As root on SuSE it is:
hpamd64:~ # echo $PS1
\[\]\h:\w # \[\]

Also check if you have an alias for mkdir or if the mkdir program is a shell wrapper.

Last edited by jschiwal; 01-04-2008 at 03:37 PM.
 
Old 01-04-2008, 04:00 PM   #9
popowich
Member
 
Registered: Nov 2004
Location: Rochester, New York
Distribution: RHEL7
Posts: 53

Original Poster
Rep: Reputation: 15
My /bin/mkdir is the binary, not aliased, and not a wrapper.

Quote:
[root@holdems tmp]# which mkdir
/bin/mkdir

If I su - root and eliminate any of my personal prompt preferences the problem still exists.

Quote:
{DING! popowich@holdems ~} su - root
Password:
[root@holdems ~]# cd /tmp
[root@holdems tmp]# mkdir 123456
mkdir: cannot create directory `123456': No such file or directory
 
Old 01-04-2008, 05:49 PM   #10
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
What about your aliases?
Also, can you create a directory with a number name as a normal user in you home directory?

As far as I know, you should be able to run the set builtin command. Are you using the bash shell?
Try "type set" and "type mkdir".
 
Old 01-04-2008, 06:10 PM   #11
popowich
Member
 
Registered: Nov 2004
Location: Rochester, New York
Distribution: RHEL7
Posts: 53

Original Poster
Rep: Reputation: 15
Quote:
{7:07pm popowich@holdems ~} ls -la /home
drwx------ 7 popowich users 4096 Jan 4 19:02 popowich

{7:07pm popowich@holdems ~} pwd
/home/popowich

{7:07pm popowich@holdems ~} mkdir 1
mkdir: cannot create directory `1': No such file or directory

Also, I tried as bash, here are the results:
Quote:
{7:07pm popowich@holdems ~} /bin/bash

bash-3.1$ type set
set is a shell builtin

bash-3.1$ type mkdir
mkdir is /bin/mkdir

bash-3.1$ mkdir 22
mkdir: cannot create directory `22': No such file or directory
 
Old 01-12-2008, 05:56 PM   #12
popowich
Member
 
Registered: Nov 2004
Location: Rochester, New York
Distribution: RHEL7
Posts: 53

Original Poster
Rep: Reputation: 15
I'm done with migrating my sites to a new server.

I'm happy to try anything else, no matter how destructive it might be on the old server.

-Raymond
 
Old 01-17-2008, 04:01 AM   #13
Nullivex
LQ Newbie
 
Registered: Jan 2008
Location: Colorado
Distribution: CentOS 5 & uBuntu 6.06, 7.10
Posts: 12

Rep: Reputation: 0
I have this error as well. Very tricky.

So far I have replaced all of my bin binaries switched kernels had server support personell from different website look into the issue and read serveral forum threads. This is a weird one. So far the only solution I have seen is to reload the OS of course I would love to take the cheaper route and figure this out and I have noticed a lot of people with this problem recently is this a bug with cent?
 
Old 01-17-2008, 06:24 AM   #14
popowich
Member
 
Registered: Nov 2004
Location: Rochester, New York
Distribution: RHEL7
Posts: 53

Original Poster
Rep: Reputation: 15
FWIW, "Upgrade the OS" didn't even work.

I'm all for experimenting with new things to try.

Any ideas?

-Raymond
 
Old 01-17-2008, 06:00 PM   #15
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
According to these guys, almost definitely a rootkit: http://www.unix.com/unix-advanced-ex...tory-name.html

Edit: Might be a good idea to get this moved to the RedHat forum, in the hope that
1. somebody has the soln
2. somebody there has a PAID RHEL subscription and can ask RH; they should know the answer if anybody does...

Last edited by chrism01; 01-17-2008 at 06:20 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't create directories tebucky Linux - Newbie 5 10-21-2006 03:39 PM
Samba: "homes" share, cannot create directories, can create files Herg Linux - Software 1 09-14-2006 08:48 AM
Do we need to create the log and db directories by ourselves Niceman2005 Linux - Software 0 11-17-2004 09:08 PM
Can't create directories in /proc keripukki Linux - Software 3 09-03-2004 01:26 PM
Create several directories? AutOPSY Linux - Newbie 3 03-30-2004 07:51 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:17 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration