Solved

I cannot change permissions or access several files

Posted on 2008-06-10
9
403 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
  • 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
 
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
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 
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

Scale it in WD Gold

With up to ten times the workload capacity of desktop drives, WD Gold hard drives employ advanced technology to deliver among the best in reliability, capacity, power efficiency and performance.

Join & Write a Comment

Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
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.

747 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

10 Experts available now in Live!

Get 1:1 Help Now