Solved

I cannot change permissions or access several files

Posted on 2008-06-10
9
429 Views
Last Modified: 2013-12-25
I'm trying to backup a website, however there are a few files that I cannot access.  I tried using the cpanel file manager and ftp.  I get permission denied, in ftp the attributes are 660 (owner and group can read/write).  If I try changing this I get access denied.  I tried logging in with the primary ftp account, and then created a new ftp, neither will let me access the files.
Any ideas?
0
Comment
Question by:innovateusa
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
  • 2
9 Comments
 
LVL 5

Expert Comment

by:rslqld
ID: 21756364
What is the current owner and group set to?
0
 

Author Comment

by:innovateusa
ID: 21759273
ah.. it's set to user "3206" and group "3206" while everything else is set to the regular ftp login user.    Should I try creating an ftp user called 3206 or do you know where to find that user in cpanel?  
0
 

Author Comment

by:innovateusa
ID: 21760809
I tried setting up 3206 as ftp, it still has the same permissions as my regular login.  I also tried making a full backup from cpanel, it made a tar file of the entire site except for those files with the 3206 permission.  
0
Get MongoDB database support online, now!

At Percona’s web store you can order your MongoDB database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card. Handle your MongoDB database support now!

 
LVL 10

Expert Comment

by:elf_bin
ID: 21760880
So the files are owned by a user called 3206 or uid=3206?  Simple way to test, create a user with uid of 3206 by using the -u parameter of adduser.  Then login as said person and attempt to read/write to the files.
0
 
LVL 5

Expert Comment

by:rslqld
ID: 21764369
As above ^^
0
 

Author Comment

by:innovateusa
ID: 21771406
where do I use the the adduser -u?  In ftp or in cpanel somewhere?  
0
 
LVL 5

Accepted Solution

by:
rslqld earned 300 total points
ID: 21773900
Generally via SSH. This is not possible via cPanel (from my experience) or any half way secure FTP installation. So if you don't have shell access you may need to get your webhost to chown the directory/files in question.
0
 
LVL 10

Assisted Solution

by:elf_bin
elf_bin earned 200 total points
ID: 21776594
At the command-line. (I assume you can get a sdhell on the host machine)  It's very easy to use.  From the man page:
useradd [-c comment] [-d home_dir] [-e expire_date] [-f inactive_time] [-g initial_group] [-G group[,...]] [-m [-k skeleton_dir] | -M] [-n] [-o] [-p passwd] [-r] [-l] [-s shell] [-u uid] login
So you could do something like:
useradd -c "I am just trying this to cure a problem" -d /home/tester -g testusers -p testerpassword -u 3206 testuser
You should note that most parts of useradd have defaults (usually in somewhere like /etc/defaults/useradd).  Read the man page for additional information.  It's probably a good idea to ensure the group (-g and -G parameters - a member can belong to more than one group) already exists before you add the user (it just makes it easier).
The advantages of using the command-line native tools:
1) You will ultimately get a better unbderstanding of linux and how it works.
2) Generally they work across distributions.
3) A GUI is layered on top of the core, so when problems occur, the GUI may not be available.  The same principles apply to GUI admin tools like webmin or cPanel.
4) Often (but not always) it's easier and quicker to use.
5) They can be scripted (automated).
6) Since the user add is seperate from where the account information is stored, the same program(s) can be used to manage account information that stored in different ways (but this is not always true).
I'd strongly urge you to use command-line, I think it'll pay back time and time again.
0
 

Author Closing Comment

by:innovateusa
ID: 31465776
I did chown -R at at the shell, that fixed it
0

Featured Post

Containers & Docker to Create a Powerful Team

Containers are an incredibly powerful technology that can provide you and/or your engineering team with huge productivity gains. Using containers, you can deploy, back up, replicate, and move apps and their dependencies quickly and easily.

Question has a verified solution.

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

Fine Tune your automatic Updates for Ubuntu / Debian
This program is used to assist in finding and resolving common problems with wireless connections.
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Suggested Courses

627 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