LinuxQuestions.org
Visit Jeremy's Blog.
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 08-11-2008, 01:37 PM   #1
jamesnkk
LQ Newbie
 
Registered: Aug 2008
Posts: 4

Rep: Reputation: 0
How to Set nobody Permission


Hello everyone, I am a newbie in Linux. My company have a tester machine installed with Suse 10 samba.

I have set the IP address of the Linux machine to connect into the Windows 2003 server.
So in my windows XP I could browse thru the machine and also set a share folder /tmp on the linux machine. Everything work perfect, the problem is that everytime the linux generate a new log file and save into the /tmp folder. From Windows XP I cannot move the newly generate log file from /tmp folder to backup folder on linux machine.
When I look at the permission using ls -ls , the permission rwx was given to Root. And it treated me as an "Nobody" user account. How can I change the permission so that "nobody" account also have the rwx permission. Security is not important. How could i perform such change ? May the expert please advise.

Last edited by jamesnkk; 08-11-2008 at 02:17 PM.
 
Old 08-11-2008, 02:54 PM   #2
mantonr
LQ Newbie
 
Registered: Apr 2005
Location: England
Distribution: Gentoo
Posts: 20

Rep: Reputation: 0
You need to change the permissions of the file from the root account using the chmod command.

If security is not an issue and you aren't bothered who will be able to use the file then you could simply do:

chmod 777 filename

This would give everybody complete permissions on the file. You will have to do this from the root account though given the present permissions.
 
Old 08-11-2008, 03:07 PM   #3
aleTT
LQ Newbie
 
Registered: Jul 2008
Location: Italy
Distribution: Debian Sid
Posts: 12

Rep: Reputation: 0
I'm not an expert but when I have to change permission of a file or a directory I use the program chmod which stands for change mode.
Shortly:
to use the program do
# chmod XXX yourFile
where XXX is a number of three digit and every digit is in octal.
This allow us to code the permission which are of the form "rwx-rwx-rwx".

This is how numbers are coded in octal and binary
octal....binary
0........000
1........001
2........010
3........011
4........100
5........101
6........110
7........111

So if we do
# chmod 777 yourFile
then your file would get "rwx rwx rwx" permission since 777 in binary is "111 111 111".
if we do
# chmod 234 yourFile
you get "010 011 100" which means "-w- -wx r--".

More info from man chmod and http://en.wikipedia.org/wiki/Chmod .

Last edited by aleTT; 08-11-2008 at 03:15 PM.
 
Old 08-11-2008, 04:02 PM   #4
john test
Member
 
Registered: Jul 2008
Distribution: ubuntu 9.10
Posts: 527
Blog Entries: 1

Rep: Reputation: 35
could you just do sudo mv file newlocation?
The sudo command would make nobody Root temporarily ???
 
Old 08-11-2008, 04:07 PM   #5
aleTT
LQ Newbie
 
Registered: Jul 2008
Location: Italy
Distribution: Debian Sid
Posts: 12

Rep: Reputation: 0
I feel more secure using "su"
 
Old 08-11-2008, 04:38 PM   #6
john test
Member
 
Registered: Jul 2008
Distribution: ubuntu 9.10
Posts: 527
Blog Entries: 1

Rep: Reputation: 35
Quote:
Originally Posted by aleTT View Post
I feel more secure using "su"
There is a TV character named "Monk" that uses that phrase on a regular basis. Sorry bout that, no offenses intended.
I use su myself, but sudo works across platform while su is locked in some distros.
 
Old 08-11-2008, 04:56 PM   #7
aleTT
LQ Newbie
 
Registered: Jul 2008
Location: Italy
Distribution: Debian Sid
Posts: 12

Rep: Reputation: 0
I can't imagine what kind of TV program is that with such characters in it.
Can you describe me how "Monk" looks like ?
 
Old 08-11-2008, 05:02 PM   #8
GushpinBob
Member
 
Registered: Aug 2007
Distribution: File Server: Ubuntu 10.04
Posts: 56

Rep: Reputation: 15
Monk is just a television series starring Tony Shalhoub as the shows main character. More info here: http://it.wikipedia.org/wiki/Monk

Last edited by GushpinBob; 08-11-2008 at 05:05 PM.
 
Old 08-11-2008, 05:06 PM   #9
aleTT
LQ Newbie
 
Registered: Jul 2008
Location: Italy
Distribution: Debian Sid
Posts: 12

Rep: Reputation: 0
Grazie GushpinBob, ma era per vedere se è veramente cieco o scherza.
 
Old 08-11-2008, 06:52 PM   #10
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,355

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Personally I prefer the symbolic mode, much easier:

chmod ugo=rwx filename
 
Old 08-11-2008, 10:08 PM   #11
jamesnkk
LQ Newbie
 
Registered: Aug 2008
Posts: 4

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by mantonr View Post
You need to change the permissions of the file from the root account using the chmod command.

If security is not an issue and you aren't bothered who will be able to use the file then you could simply do:

chmod 777 filename

This would give everybody complete permissions on the file. You will have to do this from the root account though given the present permissions.
I have tried chmod command before, it only work for existing files.
You see the linux tester machine would generate a new file, I do not want to chmod everytime a new file is created.
I heard of umask 000, I have written on the etc/profile, but still doesn't work

Last edited by jamesnkk; 08-11-2008 at 10:19 PM.
 
Old 08-11-2008, 10:10 PM   #12
jamesnkk
LQ Newbie
 
Registered: Aug 2008
Posts: 4

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by john test View Post
could you just do sudo mv file newlocation?
The sudo command would make nobody Root temporarily ???
We will need to move the file from windows xp not directly at the Linux machine.SO i cannot use mv.

Last edited by jamesnkk; 08-11-2008 at 10:12 PM.
 
Old 08-11-2008, 10:22 PM   #13
jamesnkk
LQ Newbie
 
Registered: Aug 2008
Posts: 4

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by aleTT View Post
I'm not an expert but when I have to change permission of a file or a directory I use the program chmod which stands for change mode.
Shortly:
to use the program do
# chmod XXX yourFile
where XXX is a number of three digit and every digit is in octal.
This allow us to code the permission which are of the form "rwx-rwx-rwx".

This is how numbers are coded in octal and binary
octal....binary
0........000
1........001
2........010
3........011
4........100
5........101
6........110
7........111

So if we do
# chmod 777 yourFile
then your file would get "rwx rwx rwx" permission since 777 in binary is "111 111 111".
if we do
# chmod 234 yourFile
you get "010 011 100" which means "-w- -wx r--".

More info from man chmod and http://en.wikipedia.org/wiki/Chmod .
I don't want to use chmod every time a new file is created. So I though
the best way out is to set permission for nobobdy to rw, since most of the time I will be using windows XP to move the new file to another folder.
 
Old 08-11-2008, 11:34 PM   #14
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
The /tmp directory may not be the best use as a service. It will contain a lot of junk.

There are two things at play here. First you are connecting as an unauthenticated user from Windows. You should create an account with the same username and password as on windows. Then use "smbpasswd" to add your account/password to the samba database /etc/samba/smbpasswd.

Second, this is a world readable/writable directory, so it also has the sticky bit set to prevent abuse. This means that only the owner of a file can delete a file. Since you are not authenticated, you aren't the owner. You can copy the file from windows but moving involves deleting.

SuSE has a samba-doc package that contains three books. Install that package and read through "Samba 3 By Example" and "Samba 3 Howto & Reference Guide". The package will install them to /usr/share/doc/packages/samba/ in both pdf and html form.

Last edited by jschiwal; 08-11-2008 at 11:35 PM.
 
  


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
how to set permission to this file? ZAMO Linux - Server 6 04-02-2008 03:09 AM
How can set execute permission. deepak_message Linux - Software 3 11-03-2007 09:22 AM
unable to set permission sunlinux Linux - General 4 02-18-2007 11:00 PM
Cannot set write permission naveedbs Linux - Newbie 2 09-13-2003 10:54 AM
how to set quota, a/c and permission gogo Linux - General 1 10-09-2001 01:54 PM

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

All times are GMT -5. The time now is 12:55 PM.

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