LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-21-2007, 08:37 PM   #1
centosfan
Member
 
Registered: Jun 2003
Location: Golem city
Distribution: Server - Debian Desktop - Linux Mint
Posts: 219

Rep: Reputation: 32
How to change ownership?(Atleast i think that is problem)


I have problem which happened beacuse i forget what can happen doing that.I was download and extract one script over ssh using root password and when i want to update script over ftp and i cant beacuse it's permission denied since script is updated by root.Before i was solve that problem by loging to SFTP as root but the problem is this server doesnt have root,it only have user admin with sudo root rights.How to make access granted?(except delete script and creating it again over ssh but this time with normal user password)
 
Old 04-21-2007, 08:43 PM   #2
centosfan
Member
 
Registered: Jun 2003
Location: Golem city
Distribution: Server - Debian Desktop - Linux Mint
Posts: 219

Original Poster
Rep: Reputation: 32
Another problem:i have ssh username admin and it cant go to directory of www files(permission denied)
and if go in with root then i cant access with ftp.


UPDATE:I was notice if i chmod file with 777 then i can upload file.But is'nt 777 toomuch security risk?

Last edited by centosfan; 04-21-2007 at 09:04 PM.
 
Old 04-21-2007, 09:10 PM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,137

Rep: Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122
"man chown"
 
Old 04-22-2007, 08:58 AM   #4
centosfan
Member
 
Registered: Jun 2003
Location: Golem city
Distribution: Server - Debian Desktop - Linux Mint
Posts: 219

Original Poster
Rep: Reputation: 32
Hmm it's workign withing cmod 776 also but the problem is then i need to chmod every subdirectory which i wanna edit.What is command for chmod all subdirectories in directory?
 
Old 04-22-2007, 09:05 AM   #5
rocket357
Member
 
Registered: Mar 2007
Location: 127.0.0.1
Distribution: OpenBSD-CURRENT
Posts: 485
Blog Entries: 187

Rep: Reputation: 74
Quote:
Originally Posted by JACOBKELL
Hmm it's workign withing cmod 776 also but the problem is then i need to chmod every subdirectory which i wanna edit.What is command for chmod all subdirectories in directory?
Nearly any file system command in linux (POSIX, specifically) has an -R (recursive). To answer specifically:

chmod -R ### /path/to/directory

will recursively chmod the files/directories/etc...but why break open your permissions when you can login as root and run:

chown <user> /path/to/script

to "give it back" to the original user? Same goes for chgrp (in case you need to change the group)...
 
Old 04-22-2007, 04:07 PM   #6
centosfan
Member
 
Registered: Jun 2003
Location: Golem city
Distribution: Server - Debian Desktop - Linux Mint
Posts: 219

Original Poster
Rep: Reputation: 32
Before trying this one more question:
i have only one ssh username-admin which become root if type sudo su -
So when i type users in console it shows only admin on user.And my ftp username is totaly different.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot change ownership jamaso Slackware 11 11-08-2010 11:01 AM
change ownership script paul_mat Linux - Software 3 04-07-2006 07:59 PM
Change ownership apffal SUSE / openSUSE 1 11-09-2005 02:08 AM
unable to change ownership arjunjeyaprakash Linux - Newbie 12 09-06-2005 02:02 PM
change ownership Johng Linux - General 4 04-06-2004 02:24 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:30 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration