LinuxQuestions.org
Help answer threads with 0 replies.
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 09-11-2012, 09:00 PM   #46
BMX_ATVMAN14
LQ Newbie
 
Registered: Sep 2012
Posts: 28

Original Poster
Rep: Reputation: Disabled

Another question, I can't seem to find a staright answer, I want to give my user read and write access (not root)
Because it does this:
Code:
Cannot write to `install.sh.1' (Permission denied).
[minecraft@metroville html]$
 
Old 09-11-2012, 09:16 PM   #47
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
Hi,

since you had been running the minecraft server as root in the minecraft users home directory there will be a bunch of old root owned files in the minecraft users home directory. I think the best thing to do here is (as root) is delete all those root owned files (in the minecraft users directory) and then, don't do things as root.

You can see how owns various files and directories by using ls with the -l flag. Ie
Code:
ls -l
Alternatively you can change the ownership of those files using the chown command.
Eg
Code:
chown minecraft.minecraft install.sh.1
Again this would have to be done as root if the file install.sh.1 is owned by root.

HTH,

Evo2.


PS. I'm glad you appreciate my help, but it would be great if you could click on the "Did you find this post helpful? Yes" links. ;-)
 
1 members found this post helpful.
Old 09-11-2012, 09:34 PM   #48
BMX_ATVMAN14
LQ Newbie
 
Registered: Sep 2012
Posts: 28

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by evo2 View Post
Hi,

since you had been running the minecraft server as root in the minecraft users home directory there will be a bunch of old root owned files in the minecraft users home directory. I think the best thing to do here is (as root) is delete all those root owned files (in the minecraft users directory) and then, don't do things as root.

You can see how owns various files and directories by using ls with the -l flag. Ie
Code:
ls -l
Alternatively you can change the ownership of those files using the chown command.
Eg
Code:
chown minecraft.minecraft install.sh.1
Again this would have to be done as root if the file install.sh.1 is owned by root.

HTH,

Evo2.


PS. I'm glad you appreciate my help, but it would be great if you could click on the "Did you find this post helpful? Yes" links. ;-)
I can't download the install file because I don't have access do when I do the chown command it doesn't find it

Thanks
 
Old 09-11-2012, 09:45 PM   #49
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
Hi,
Quote:
Originally Posted by BMX_ATVMAN14 View Post
I can't download the install file because I don't have access do when I do the chown command it doesn't find it
Do you see it when you do an 'ls -l'?
Again, output from the terminal can be helpful.

Evo2.
 
Old 09-11-2012, 09:58 PM   #50
BMX_ATVMAN14
LQ Newbie
 
Registered: Sep 2012
Posts: 28

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by evo2 View Post
Hi,


Do you see it when you do an 'ls -l'?
Again, output from the terminal can be helpful.

Evo2.
Reply from "minecraft" user
Code:
[minecraft@metroville ~]$ ls -l
total 12
drwxrwxr-x 4 minecraft minecraft 4096 Sep 11 20:58 Metroville
-rw-rw-r-- 1 minecraft minecraft 4558 Sep  2 04:00 wget-log
[minecraft@metroville ~]$
Reply from "root"
Code:
[root@metroville ~]# ls -l
total 0
-rw-r--r-- 1 root root 0 Sep  5 21:21 Finished
-rw-r--r-- 1 root root 0 Sep  5 21:21 Package
-rw-r--r-- 1 root root 0 Sep  5 21:21 Processing
-rw-r--r-- 1 root root 0 Sep  5 21:21 Running
[root@metroville ~]#
 
Old 09-11-2012, 10:24 PM   #51
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
Hi,

you need to cd to the directory that you want to work in. The directory that you are put in when you ssh to the machine should be the home directory of that particular user. For the root user that should be /root and for the minecraft user that is probably /home/minecraft . Please get the hang of using cd, pwd and ls to navigate the file system, then you should be able to solve your problems related to where you can downloads files.

Evo2.

PS. Within the shell, the directory "~" can be used as sort of alias forcurrent users home directory. The "~" in your prompt is indicating the that you are in that users home directory. You can use the pwd command to confirm this.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Iptables can't port forward (PAT Port address translation) sfrederiksen Linux - Networking 7 12-20-2011 11:47 AM
If I forward a port in iptables, does the port have to be open on the firewall? qwertyjjj Linux - Server 4 08-06-2009 10:22 AM
A way to forward an IP/Port to another system's IP/Port astroboy5714 Linux - Networking 6 01-26-2004 06:45 PM
how to port forward - correctly 68javelin Linux - Software 0 11-16-2002 07:47 PM
Forward port port 80 to lan web server dulaus Linux - Networking 9 10-04-2002 04:45 AM


All times are GMT -5. The time now is 11:38 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration