Solved

error moving folder to var/www/clients/client2/web

Posted on 2014-03-10
17
370 Views
Last Modified: 2014-03-15
Hi,

I am logged in as root and tried moving a folder from one folder to error moving folder to var/www/clients/client2/web3 and receiving permission denied.
0
Comment
Question by:cesemj
  • 9
  • 3
  • 3
  • +1
17 Comments
 

Author Comment

by:cesemj
ID: 39919209
I thought root has permission to do anything.  the permissions on the folder display root.  Any suggestions would be helpful.
0
 
LVL 8

Expert Comment

by:N-W
ID: 39919270
What's the exact command you are issuing and which Linux distribution are you running?
0
 

Author Comment

by:cesemj
ID: 39919344
ubuntu 12.04lts and the command cp -R uploads ./web3.  It is like root does not have permission to this folder.
0
 
LVL 8

Expert Comment

by:N-W
ID: 39919368
What is the result of this command:
sudo cp -R uploads ./web3

Open in new window

Also try using the full path of the directories, for example:
sudo cp -R /var/www/clients/client2/web3/uploads /var/www/clients/client2/web3/web3

Open in new window

0
 

Author Comment

by:cesemj
ID: 39919382
root:/var/www/clients/client2# sudo cp -R uploads ./web3
cp: cannot create directory `./web3/uploads': Permission denied


root:/var/www/clients/client2# sudo cp -R /var/www/clients/client2/uploads /var/www/clients/client2/web3/web3
cp: cannot create directory `/var/www/clients/client2/web3/web3': Permission denied


root:/var/www/clients/client2# ls -la
total 1080616
drwxrwxrwx  9 root client2       4096 Mar 10 21:02 .
drwxr-xr-x  3 root client2       4096 Jun 13  2013 ..
drwxr-xr-x  2 root root          4096 Mar 10 20:42 Archive
drwxr-xr-x  2 root root          4096 Mar 10 19:50 help
-rw-r--r--  1 root client2         44 Aug 29  2013 .htpasswd
drwxr-xr-x  2 root root          4096 Mar 10 20:15 new
lrwxrwxrwx  1 root client2         30 Jun 13  2013 sitea.edu -> /var/www/clients/client2/web1/
drwxr-xr-x  3 root root          4096 Mar 10 20:26 uploads
drwxr-xr-x 12 root root          4096 Aug  1  2013 web1
drwxr-xr-x  9 root root          4096 Jun 17  2013 web2
drwxr-xr-x 13 root root          4096 Aug 16  2013 web3
-rw-r--r--  1 root root    1106503680 Mar 10 21:00 web3.tar
0
 
LVL 48

Expert Comment

by:Tintin
ID: 39919389
The directory you are trying to copy to either has an ACL set or is a NFS mount.
0
 
LVL 8

Assisted Solution

by:N-W
N-W earned 167 total points
ID: 39919409
Looking at the folder structure, try:
sudo cp -R /var/www/clients/client2/uploads /var/www/clients/client2/web3

Open in new window

If that doesn't work, then it's definitely some sort of ACL issue.
0
 

Author Comment

by:cesemj
ID: 39919426
Where should I look?
0
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 

Author Comment

by:cesemj
ID: 39919430
Thanks for you help,  I inherited the box and no documentation.  I keep running into road blocks I guess its time to build a new server:

root:~# sudo cp -R /var/www/clients/client2/uploads /var/www/clients/client2/web3
cp: cannot create directory `/var/www/clients/client2/web3/uploads': Permission denied
0
 
LVL 34

Accepted Solution

by:
Seth Simmons earned 167 total points
ID: 39919453
mount | grep acl

see if anything is returned
acl is a file system mount option

FilePermissionsACLs
https://help.ubuntu.com/community/FilePermissionsACLs
0
 
LVL 48

Assisted Solution

by:Tintin
Tintin earned 166 total points
ID: 39919458
What's the output of:

df -h

grep SELINUX= /etc/selinux/config

getfacl /var/www/clients/client2
0
 

Author Comment

by:cesemj
ID: 39921800
root:~# df -h
Filesystem               Size  Used Avail Use% Mounted on
/dev/mapper/site-root  117G   21G   91G  19% /
udev                     2.0G  4.0K  2.0G   1% /dev
tmpfs                    790M  752K  789M   1% /run
none                     5.0M  4.0K  5.0M   1% /run/lock
tmpfs                    2.0G     0  2.0G   0% /run/shm
/dev/sda1                228M   78M  139M  36% /boot


root:~# grep SELINUX= /etc/selinux/config
grep: /etc/selinux/config: No such file or directory



root:~# getfacl /var/www/clients/client2
getfacl: Removing leading '/' from absolute path names
# file: var/www/clients/client2
# owner: root
# group: root
user::rwx
group::rwx
other::rwx
0
 

Author Comment

by:cesemj
ID: 39921924
I tried the following and received: root:/#  sudo ln -s /var/www/corpsitea /var/www/clients/client2/web3
ln: failed to create symbolic link `/var/www/clients/client2/web3/corpsitea': Permission denied
0
 

Author Closing Comment

by:cesemj
ID: 39925249
Thank you for all your responses.  Because I received the server without any documentation I am going to rebuild the box this way i do not have to deal with any surprises.


Thanks Again!
0
 
LVL 34

Expert Comment

by:Seth Simmons
ID: 39928333
what's the output of df- hT ?
just wondering what the local file systems are
0
 

Author Comment

by:cesemj
ID: 39930415
root:~# df -hT
Filesystem              Type      Size  Used Avail Use% Mounted on
/dev/mapper/site-root ext4      117G   23G   88G  21% /
udev                    devtmpfs  3.9G  4.0K  3.9G   1% /dev
tmpfs                   tmpfs     1.6G  756K  1.6G   1% /run
none                    tmpfs     5.0M  4.0K  5.0M   1% /run/lock
tmpfs                   tmpfs     3.9G     0  3.9G   0% /run/shm
/dev/sda1               ext2      228M   78M  139M  36% /boot
0
 
LVL 34

Expert Comment

by:Seth Simmons
ID: 39931935
ok...blows away that theory.  had a thought if it was formatted ext3 but obviously irrelevant
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Can't get /etc/resolv.conf to configure after reboot 8 72
Trying to make SNMP connection work 7 65
Video Streaming 6 56
expectj telnet failing 5 23
This is the error message I got (CODE) Error caused by incompatible libmp3lame 3.98-2 with ffmpeg I've googled this error message and found out sometimes it attaches this note "can be treated with downgrade libmp3lame to version 3.97 or 3.98" …
SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now