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

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat Mkdir: cannot create directory `/home/phpmy/html': Permission denied centos
# 1  
Old 04-30-2013
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

Code:
[oracle@localhost ~]$ df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda8              12G  5.3G  6.5G  45% /
tmpfs                 3.8G  1.2M  3.8G   1% /dev/shm
/dev/sda6             190M  144M   37M  80% /boot
/dev/sda12            178G  112G   57G  67% /home
/dev/sda9             4.0G  408M  3.4G  11% /tmp
/dev/sda13             18G  4.2G   13G  25% /u01
/dev/sda10            4.0G  1.7G  2.1G  46% /u02
/dev/sda11            5.0G  693M  4.0G  15% /u03

any reinstall will not remove /home directories provided correct reinstall options are provided

upon reinstall when I login as phpmy and make a directory, I encountered the following error.

Code:
[phpmy@localhost ~]$ mkdir -p /home/phpmy/html
mkdir: cannot create directory `/home/phpmy/html': Permission denied
[phpmy@localhost ~]$

here's my directory details
Code:
[root@localhost ~]# ls -dalh /
drwxr-xr-x. 30 root root 4.0K Apr 30 22:23 /
[root@localhost ~]# ls -dalh /home
drwxr-xr-x. 10 root root 4.0K Apr 30 23:55 /home
[root@localhost ~]# ls -dalh /home/phpmy/
drwxr-xr-x. 9 504 504 4.0K Apr 27 23:53 /home/phpmy/
[root@localhost ~]# ls -dalh /home/oracle
drwx------. 65 oracle oracle 4.0K Apr 30 23:30 /home/oracle

so what should I do to resolve the above issue?

thanks a lot!
# 2  
Old 04-30-2013
There's no guarantee that upon a system reinstallation UIDs remain the same.

Whatever user that used to belong to UID 504 apparently no longer matches its new UID.

You can chown -R your home dir, or modify the UID in /etc/passwd.
This User Gave Thanks to verdepollo For This Post:
# 3  
Old 04-30-2013
yes you are right I need to do a chown phpmySmiliehpmy /home/phpmy.

thanks
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Trying to create a script to run as root, permission denied

Hello all, I am trying to create a script or a .command file that will run for me and my other techs on many, many Mac OSX computers that will add a file to the /etc/ folder called /etc/launchd.conf Every time I try to run the script, I get "Permission Denied" when trying to put the file into... (13 Replies)
Discussion started by: DonnieNarco
13 Replies

2. 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

3. 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

4. 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

5. UNIX and Linux Applications

mkdir: cannot create directory

Hi, I have network mount on two servers. One server I can create any directories without any issues, other server with the similar mount, I am not able to create directories starting with number! Creation, name start with a number: $ mkdir 1212 mkdir: cannot create directory `1212': No such... (12 Replies)
Discussion started by: ./hari.sh
12 Replies

6. UNIX for Advanced & Expert Users

about the access permission of users home directory

RHEL5.0 As we know, when root create a new user, a new home directory will be created : /home/user I want to know what determine the access permission of /home/user . Thanks! (1 Reply)
Discussion started by: cqlouis
1 Replies

7. Solaris

Permission denied message for parent directory

Hi All, I have an issue that's eating my head for few days. I would appreciate if anyone could help me out in this to resolve this. In Solaris 8 container I am facing the below issue. As oracle user when I do ls -l in /dboracle mountpoint getting permission denied error messages. $ ls... (3 Replies)
Discussion started by: Sreerag446
3 Replies

8. Shell Programming and Scripting

how to display the permission of the home directory

can anyone tell me how to display the permissions of a users home directory. can i use ls -l but it only gives the permissions of the files and directories inside the directory..:confused::confused::confused::confused: (9 Replies)
Discussion started by: nadman123
9 Replies

9. UNIX for Advanced & Expert Users

ssh home directory permission

Hi All, I am using sftp to transfer files between two unix machines. As per my knowledge, in order to use public key authentication, the remote user's home directory permission should be set to 750 ( basically group and others should not have write permission ). Is there any way to over ride... (1 Reply)
Discussion started by: shihabvk
1 Replies
Login or Register to Ask a Question