LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-02-2011, 09:46 AM   #1
browser
Member
 
Registered: Aug 2004
Location: Australia,NSW
Distribution: CalculateLinux, FreeBSD, Makulu, OpenSuse
Posts: 269

Rep: Reputation: 30
Can't seem to create a dot file in /tmp


Does anyone know why I cant seem to create a dot file (a file that starts with a dot) in my /tmp folder even with root priviledges.
I installed F-Prot for linux & when I try to do a scan it complains it "can't stat a file" it seems to want to create & quits.
So I tried creating it my self but it wont create a file that starts with a dot it seems.
I also tried "chmod go+rx /tmp/*"

This is the error

root@JASONS-BRAAIN:/opt/f-prot# /opt/f-prot/fpscan -l

F-PROT Antivirus version 6.3.3.5015 (built: 2009-12-23T13-43-55)


FRISK Software International (C) Copyright 1989-2009
Engine version: 4.5.1.85
Arguments: -l
Virus signatures: 20110302085251a5831295bf5d63fab0ace3bc26874c
(/opt/f-prot/antivir.def)


Can not stat '/tmp/.mount_qRI1wR': Permission denied
 
Old 03-02-2011, 10:20 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
touch /tmp/.file : Works OK on Fedora, Debian, PCLinuxOS.

Permissions are equal for the three example OS : 'ls -l /' :
drwxrwxrwt 8 root root 240 Nov 27 01:21 tmp/ ( That's Debian Etch.)


/tmp/ has "special" permissions. And they shouldn't be changed.
May be you don't have "drwxrwxrwt" ? ?

..
 
Old 03-02-2011, 10:31 AM   #3
SL00b
Member
 
Registered: Feb 2011
Location: LA, US
Distribution: SLES
Posts: 375

Rep: Reputation: 112Reputation: 112
You're not failing to create a file, you're failing to stat it, which means you're checking file status. I see you're submitting the command as root... but is it actually running as root?

Check to see if there's a configuration parameter in f-prot.conf that gives a run-as userid. Typically, it's a bad idea to run an AV solution as root, and they'll create another userid at install time, but I'm not directly familiar with F-Prot.

Nex, look at the permissions for the directories / and /tmp. Whatever userid you're running under, it has to have execute privilege to both of those directories in order to run stat. It doesn't need file privileges, but it needs execute to every step in the path. Typically, /tmp should have its permissions set to global r-w-x.

Optionally, you might also find a config parameter in f-prot.conf to set the temporary directory, and you could point it somewhere else.
 
Old 03-02-2011, 01:52 PM   #4
devUnix
Member
 
Registered: Oct 2010
Posts: 606

Rep: Reputation: 59
Try this:

Code:
chmod 1777 /tmp
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't login, says tmp directory full but tmp file is empty! Could be linked to MySQL? bethanlowder Fedora 7 09-25-2009 07:17 AM
Fedora 8 and NoMachine "Could not create lock file in /tmp/.tX1002-lock" ln3wb13 Linux - Software 3 05-17-2008 01:31 PM
procmail: Couldn't create or rename temp file "/var/spool/mail/tmp/.... paul_mat Linux - Software 0 05-02-2006 06:16 PM
Create file using 'touch ./tmp.$$', file tmp.3941 is created, why? huangyanfeng Linux - General 1 04-13-2004 03:36 AM
ERROR: Couldn't create temporary file in /tmp/ bananaman Linux - Newbie 5 04-09-2003 09:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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