LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 07-01-2008, 10:53 AM   #1
Reps911
LQ Newbie
 
Registered: Jun 2008
Location: california
Distribution: Yellow Dog 6.0
Posts: 21

Rep: Reputation: 15
not authorized to write files????


I'm currently runing Yellow Dog 6.0 and I'm tring to move files to the Hard drive but I keep getting an error that says "unable to write files, user not authorized" any pointers?
 
Old 07-01-2008, 12:38 PM   #2
sydney-troz
Member
 
Registered: Feb 2007
Distribution: Kubuntu, it's obese barely-usable sibling, Ubuntu
Posts: 142

Rep: Reputation: 15
Where are you copying the files to (which directory)? Post the output of "ls -ld /path/to/dest" where "/path/to/dest" is the absolute path of your destination directory. Also tell us which user you're running as.
 
Old 07-02-2008, 08:20 PM   #3
Reps911
LQ Newbie
 
Registered: Jun 2008
Location: california
Distribution: Yellow Dog 6.0
Posts: 21

Original Poster
Rep: Reputation: 15
I can't install anything... I'm trying to install firefox 3.0 but it says I am not authorized to write to the directory. I'm trying to write to the hard drive file. I can save to the desktop and to my home folder but not to the, and forgive me for using this term but I am a total newb... I'm trying to save to what would be the C:/ drive... as far as user I have no idea what user would be the authorized one as I am the only user on linux..
 
Old 07-02-2008, 08:41 PM   #4
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 61
Either install it into your own directories, or you have to run the installer as root.
 
Old 07-02-2008, 10:10 PM   #5
Reps911
LQ Newbie
 
Registered: Jun 2008
Location: california
Distribution: Yellow Dog 6.0
Posts: 21

Original Poster
Rep: Reputation: 15
well how do i get authorization???? i'm the only user... is there a setting that i'm missing? i would like to be able to write and move files from the hard drive
 
Old 07-02-2008, 10:29 PM   #6
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 61
If you don't want to shoot yourself in the foot, learn to work within the well-thought, time tested permissions system.

Are you installing via command line? If so:

$ sudo my_installer_here
 
Old 07-02-2008, 11:00 PM   #7
Reps911
LQ Newbie
 
Registered: Jun 2008
Location: california
Distribution: Yellow Dog 6.0
Posts: 21

Original Poster
Rep: Reputation: 15
i'm using the sudo command line. It ask for my password then it said my user does not have permission to perform this task... or something like that. but i've only set up one user and all the passwords ydl6.0 asked me to create when i installed are the same. so i'm stuck...
 
Old 07-02-2008, 11:23 PM   #8
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 61
To use sudo then, you'll have to add yourself to the /etc/sudoers file. Become root on your box. You can use:

Code:
su -
Add the line:

Code:
your_user_name        ALL=(ALL) ALL
where you replace your_user_name above with your login user name. Save the file and exit the root shell created with su. Now your sudo commands will allow you to do anything, and allow about 5 minutes before your cached password expires, wherein you'll just enter your password again after that time on the next sudo command you need to execute.
 
Old 07-02-2008, 11:52 PM   #9
Reps911
LQ Newbie
 
Registered: Jun 2008
Location: california
Distribution: Yellow Dog 6.0
Posts: 21

Original Poster
Rep: Reputation: 15
okay this is what i'm getting::

[reps911@localhost ~]$ su -
Password:
[root@localhost ~]# reps911 ALL=(ALL) ALL
-bash: syntax error near unexpected token `('



I think i'm misunderstanding what you said. what am i doing wrong? thanks for all you help


O and this is what i'm getting when i try to install firefox 3.0::

[reps911@localhost ~]$ cd ~/Desktop
[reps911@localhost Desktop]$ sudo tar jxvf firefox-3.0.tar.bz2 -c /opt/
reps911 is not in the sudoers file. This incident will be reported.

Last edited by Reps911; 07-02-2008 at 11:54 PM. Reason: addition
 
Old 07-03-2008, 12:00 AM   #10
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670
Quote:
Originally Posted by Reps911 View Post
okay this is what i'm getting::

[reps911@localhost ~]$ su -
Password:
[root@localhost ~]# reps911 ALL=(ALL) ALL
-bash: syntax error near unexpected token `('

I think i'm misunderstanding what you said. what am i doing wrong? thanks for all you help
run:
Code:
su -
<enter root password>
visudo
Look for the line:
Code:
# %wheel  ALL=(ALL) ALL
Move the cursor to the beginning of the line and enter the keys:
2x

or press the delete key twice. This will uncomment the line. Now save the file
with the command:
:wq

Next add yourself to the "wheel" group. The line you uncommented allows a member of the wheel group to use sudo.

About your original problem, look at the directory like:
ls -ld /media/disk
to check the permissions of the directory. If this directory is one that is a mounted partition, also check how it is mounted and the filesystem on the partiton. For example, if the partition uses the "vfat" filesystem, and is listed in the /etc/fstab file, you change the permissions for the entire filesystem in the fstab line, using the "uid=" and "gid=" options. E.G. uid=reps911,gid=reps911,dmask=007,fmask=117

These options will mount the filesystem (on the partition) with reps911 being the owner, and reps911 being the group owner with the permissions rwxrwx--- for directories and rw-rw---- for files.

Last edited by jschiwal; 07-03-2008 at 12:09 AM.
 
Old 07-03-2008, 12:07 AM   #11
Reps911
LQ Newbie
 
Registered: Jun 2008
Location: california
Distribution: Yellow Dog 6.0
Posts: 21

Original Poster
Rep: Reputation: 15
okay now I get this but have no idea what to do next:

Code:
## Sudoers allows particular users to run various commands as
## the root user, without needing the root password.
##
## Examples are provided at the bottom of the file for collections
## of related commands, which can then be delegated out to particular
## users or groups.
##
## This file must be edited with the 'visudo' command.

## Host Aliases
## Groups of machines. You may prefer to use hostnames (perhap using
## wildcards for entire domains) or IP addresses instead.
# Host_Alias     FILESERVERS = fs1, fs2
# Host_Alias     MAILSERVERS = smtp, smtp2

## User Aliases
## These aren't often necessary, as you can use regular groups
## (ie, from files, LDAP, NIS, etc) in this file - just use %groupname
## rather than USERALIAS
# User_Alias ADMINS = jsmith, mikem


## Command Aliases
 
Old 07-03-2008, 12:12 AM   #12
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670
Did you post just the first part of the sudoers file? Your reply came so soon you may not have noticed my post yet.
 
Old 07-03-2008, 12:13 AM   #13
Reps911
LQ Newbie
 
Registered: Jun 2008
Location: california
Distribution: Yellow Dog 6.0
Posts: 21

Original Poster
Rep: Reputation: 15
i'm sorry ... i'm a total newb and i'm not understanding much of this... thank's to everyone for the help.
 
Old 07-03-2008, 12:16 AM   #14
Reps911
LQ Newbie
 
Registered: Jun 2008
Location: california
Distribution: Yellow Dog 6.0
Posts: 21

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by jschiwal View Post
Did you post just the first part of the sudoers file? Your reply came so soon you may not have noticed my post yet.

i put this:
Code:
[reps911@localhost ~]$ su -
Password: 
[root@localhost ~]# visudo
and got this:
Code:
# Sudoers allows particular users to run various commands as
## the root user, without needing the root password.
##
## Examples are provided at the bottom of the file for collections
## of related commands, which can then be delegated out to particular
## users or groups.
##
## This file must be edited with the 'visudo' command.

## Host Aliases
## Groups of machines. You may prefer to use hostnames (perhap using
## wildcards for entire domains) or IP addresses instead.
# Host_Alias     FILESERVERS = fs1, fs2
# Host_Alias     MAILSERVERS = smtp, smtp2

## User Aliases
## These aren't often necessary, as you can use regular groups
## (ie, from files, LDAP, NIS, etc) in this file - just use %groupname
## rather than USERALIAS
# User_Alias ADMINS = jsmith, mikem


## Command Aliases
 
Old 07-03-2008, 12:20 AM   #15
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670
IMHO, you are giving up too quickly. Maybe my post was to wordy, but I did give step-by-step instructions for editing the sudoers file. Take care of that problem first so that it is out of the way, and then tackle the permissions problem.

Understanding mounting and how permissions work is something you will need to eventually learn to administer your computer. Even on windows, you want to learn acls and groups to be able to run your computer securely.

Part of the problem is that we don't know anything about the directory where you are having problems. If you can provide more info about it, you can get more specific advice.

Good Luck!
 
  


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
Samba, cannot see files, cannot write files. ponganthony Linux - Server 1 10-06-2007 02:57 PM
Samba, cannot see files, cannot write files. ponganthony Linux - Server 3 10-04-2007 06:24 AM
Can't see files and/or write files to DVD/RW lenny45 Linux - Hardware 0 03-29-2006 07:55 PM
Able to write files to MP3 player but no files written into actual device? olnex Linux - Hardware 0 11-11-2005 07:32 AM
Apache: You are not authorized to ... WiWa Linux - Software 10 08-15-2003 05:45 PM


All times are GMT -5. The time now is 06:52 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