mkdir: cannot create directory

 
Thread Tools Search this Thread
Special Forums UNIX and Linux Applications mkdir: cannot create directory
# 8  
Old 11-03-2010
I don't think this could be an issue with an alias, can you not create a directory called "cd"?

Just for giggles can you try this:
mkdir ./1212

If this works we can go from there.
# 9  
Old 11-04-2010
Hi
Code:
# strace -f mkdir 1212
execve("/bin/mkdir", ["mkdir", "1212"], [/* 27 vars */]) = 0
uname({sys="Linux", node="websitename.com", ...}) = 0
brk(0)                                  = 0x948f000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=98463, ...}) = 0
old_mmap(NULL, 98463, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7fa7000
close(3)                                = 0
open("/lib/libselinux.so.1", O_RDONLY)  = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\260\220"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=56328, ...}) = 0
old_mmap(0x4fa7000, 56144, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x4fa7000
old_mmap(0x4fb4000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xd000) = 0x4fb4000
close(3)                                = 0
open("/lib/tls/libc.so.6", O_RDONLY)    = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\320\276"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1454802, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7fa6000
old_mmap(0xa07000, 1223900, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xa07000
old_mmap(0xb2c000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x124000) = 0xb2c000
old_mmap(0xb30000, 7388, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb30000
close(3)                                = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7fa5000
mprotect(0xb2c000, 4096, PROT_READ)     = 0
mprotect(0x9fe000, 4096, PROT_READ)     = 0
set_thread_area({entry_number:-1 -> 6, base_addr:0xb7fa56c0, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0
munmap(0xb7fa7000, 98463)               = 0
access("/etc/selinux/", F_OK)           = 0
brk(0)                                  = 0x948f000
brk(0x94b0000)                          = 0x94b0000
open("/etc/selinux/config", O_RDONLY)   = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=448, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7fbf000
read(3, "# This file controls the state o"..., 4096) = 448
close(3)                                = 0
munmap(0xb7fbf000, 4096)                = 0
open("/proc/mounts", O_RDONLY)          = 3
fstat64(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7fbf000
read(3, "rootfs / rootfs rw 0 0\n/proc /pr"..., 1024) = 895
close(3)                                = 0
munmap(0xb7fbf000, 4096)                = 0
open("/usr/lib/locale/locale-archive", O_RDONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=48528816, ...}) = 0
mmap2(NULL, 2097152, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7da5000
close(3)                                = 0
umask(0)                                = 022
umask(022)                              = 0
mkdir("1212", 0777)                     = -1 ENOENT (No such file or directory)
stat64("1212", 0xbffeb4a0)              = -1 ENOENT (No such file or directory)
open("/usr/share/locale/locale.alias", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=2528, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7da4000
read(3, "# Locale name alias data base.\n#"..., 4096) = 2528
read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0xb7da4000, 4096)                = 0
open("/usr/share/locale/en_US.UTF-8/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_US.utf8/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_US/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en.UTF-8/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en.utf8/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
write(2, "mkdir: ", 7mkdir: )                  = 7
write(2, "cannot create directory `1212\'", 30cannot create directory `1212') = 30
open("/usr/share/locale/en_US.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_US.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_US/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
write(2, ": No such file or directory", 27: No such file or directory) = 27
write(2, "\n", 1
)                       = 1
exit_group(1)                           = ?
Process 15730 detached


and here is

Code:
\mkdir 1212
mkdir: cannot create directory `1212': No such file or directory

and

Code:
# mkdir ./1212
mkdir: cannot create directory `./1212': No such file or directory

# 10  
Old 11-04-2010
What says:
Code:
pwd
mount
mkdir a1212
mv a1212 1212
strace -f mv a1212 1212
ls -lad "$PWD"
rpm -Vv coreutils | grep mkdir

on both clients.
# 11  
Old 11-04-2010
Please note, this issue is not with mount, I cannot create directory anywhere with a numeric name.
Code:
# pwd
/root
# mkdir a1212
# mv a1212 1212
mv: cannot move `a1212' to `1212': No such file or directory
# rpm -Vv coreutils | grep mkdir
.......T.   /bin/mkdir
......... d /usr/share/man/man1/mkdir.1.gz

---------- Post updated at 02:41 PM ---------- Previous update was at 02:26 PM ----------

Code:
# touch 1111
touch: cannot touch `1111': No such file or directory

Any solution other than re installation?
# 12  
Old 11-04-2010
Apparently, your server has been compromised by some javascript virus.

Web Hosting Talk - View Single Post - Linux servers having CPANEL - js virus hitting

# 13  
Old 12-09-2010
Slightly off topic
Quote:
rm: cannot remove `a1212': Is a directory
Should be "rmdir" not "rm"
Code:
rmdir a1212


On topic, please post the permissions of the directories and the Operating System and version:
Code:
ls -lad /
ls -lad /root
uname -a

Were you logged in as "root" at the time of the problem?

Last edited by methyl; 12-09-2010 at 07:32 PM.. Reason: layout and typos
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to create a long list of directories with mkdir?

Hi... Thanks to read this... I want to use mkdir to create many directories listed in a text file, let's say. How do I do this? Sorry for this maybe very basic question :) (13 Replies)
Discussion started by: setub
13 Replies

2. Shell Programming and Scripting

Copy of "How to create a long list of directories with mkdir?"

To bakunin and corona688: My result when text in file is ms_ww_546 ms_rrL_99999 ms_nnn_67_756675 is https://www.unix.com/C:\Users\Fejoz\Desktop\ttt.jpg I hope you can see the picture. There is like a "whitespace character" after 2 of the 3 created directories. ---------- Post... (0 Replies)
Discussion started by: setub
0 Replies

3. Shell Programming and Scripting

List files with date, create directory, move to the created directory

Hi all, i have a folder, with tons of files containing as following, on /my/folder/jobs/ some_name_2016-01-17-22-38-58_some name_0_0.zip.done some_name_2016-01-17-22-40-30_some name_0_0.zip.done some_name_2016-01-17-22-48-50_some name_0_0.zip.done and these can be lots of similar files,... (6 Replies)
Discussion started by: charli1
6 Replies

4. UNIX for Dummies Questions & Answers

Mkdir a/b/c # where a/b does not exists. is it possible to create it ?

Is is possible to create the directories in following manner. for example my home dir is empty and i want to create dir a/b/c mkdir a/b/c # where a/b does not exists. (5 Replies)
Discussion started by: anandgodse
5 Replies

5. Red Hat

Mkdir: cannot create directory `/home/phpmy/html': Permission denied centos

for incompatibility installation problems, I've decided to reinstall Centos 6.3 as can be seem from the df output, I've partitioned both / and and /home directories $ df -h Filesystem Size Used Avail Use% Mounted on /dev/sda8 12G 5.3G 6.5G 45% / tmpfs ... (2 Replies)
Discussion started by: jediwannabe
2 Replies

6. Shell Programming and Scripting

mkdir home directory

Is there a way to create a directory in home directory through a bash script? And if yes then the files we want to put in there have to be put by the time is created in the bash script? (3 Replies)
Discussion started by: vlm
3 Replies

7. UNIX for Dummies Questions & Answers

mkdir: cannot create directory `/builds/somedir/': Permission denied

Hi, I am trying to run a shell script which contains an mkdir command as part of the execution. The script fails with the following error: mkdir: cannot create directory `/builds/somedir/': Permission denied The user running the script is 'harry' and belongs to group 'school'.... (5 Replies)
Discussion started by: Technext
5 Replies

8. Shell Programming and Scripting

[Solved] how to create multiple directory in one mkdir command

Hi, Unix Gurus, - I have a simple question, I need create multiple directory. I use mkdir {dir1, dir2, dir3) I got one directory as {dir1, dir2, dir3} I searched @ google, I got answer as above code.:wall::confused: Anybody has any idea Thanks in advance ---------- Post updated... (3 Replies)
Discussion started by: ken002
3 Replies

9. Homework & Coursework Questions

Create script to add user and create directory

first off let me introduce myself. My name is Eric and I am new to linux, I am taking an advanced linux administration class and we are tasked with creating a script to add new users that anyone can run, has to check for the existence of a directory. if the directory does not exist then it has... (12 Replies)
Discussion started by: pbhound
12 Replies
Login or Register to Ask a Question