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. |
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'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 . |
could you just do sudo mv file newlocation?
The sudo command would make nobody Root temporarily ??? |
I feel more secure using "su" :)
|
Quote:
I use su myself, but sudo works across platform while su is locked in some distros. |
I can't imagine what kind of TV program is that with such characters in it.
Can you describe me how "Monk" looks like ? |
Monk is just a television series starring Tony Shalhoub as the shows main character. More info here: http://it.wikipedia.org/wiki/Monk
|
Grazie GushpinBob, ma era per vedere se è veramente cieco o scherza.
|
Personally I prefer the symbolic mode, much easier:
chmod ugo=rwx filename |
Quote:
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 |
Quote:
|
Quote:
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. |
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. |
All times are GMT -5. The time now is 04:57 PM. |