unsafe map file (not file permissions ??)

  • Permalink
  • submit to reddit
  • Email
  • Follow


When running 'sendmail -v -bi -d44.4' I am getting "...unsafe map 
file..." errors.  (See output below).

I have read all the archives I could find on the matter and they all 
suggest that the problem is related to file permissions.  I have checked, 
double checked, triple checked the permissions and ownership of all the 
directories and file in the path to /etc/mail/aliases and can find no 
problems.
I have also tried removing the old files, touch /etc/mail/aliases but get 
the same errors.

What else could be wrong that would cause 'newaliases' to generate these 
errors?

A great many thanks in advance for any insight or ideas in helping to 
resolve this problem.  I'm completely baffled and don't know what else to 
try.

--
Andy



[root@server1 mail]# stat / /etc /etc/mail /etc/mail/aliases 
/usr/sbin/sendmail
  File: "/"
  Size: 4096            Blocks: 8          IO Block: 4096   Directory
Device: 302h/770d       Inode: 2           Links: 19
Access: (0755/drwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
Access: Sat Jul 19 04:02:30 2003
Modify: Tue Jul  1 09:30:40 2003
Change: Tue Jul  1 09:30:40 2003

  File: "/etc"
  Size: 4096            Blocks: 8          IO Block: 4096   Directory
Device: 302h/770d       Inode: 229377      Links: 44
Access: (0755/drwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
Access: Sat Jul 19 04:02:31 2003
Modify: Sat Jul 19 18:08:53 2003
Change: Sat Jul 19 18:08:53 2003

  File: "/etc/mail"
  Size: 4096            Blocks: 8          IO Block: 4096   Directory
Device: 302h/770d       Inode: 689157      Links: 3
Access: (0755/drwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
Access: Sat Jul 19 20:44:05 2003
Modify: Sat Jul 19 20:01:02 2003
Change: Sat Jul 19 20:01:02 2003

  File: "/etc/mail/aliases"
  Size: 0               Blocks: 0          IO Block: 4096   Regular File
Device: 302h/770d       Inode: 688487      Links: 1
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: Sat Jul 19 21:30:13 2003
Modify: Sat Jul 19 19:40:05 2003
Change: Sat Jul 19 20:40:11 2003

  File: "/usr/sbin/sendmail"
  Size: 452132          Blocks: 896        IO Block: 4096   Regular File
Device: 302h/770d       Inode: 524422      Links: 1
Access: (4555/-r-sr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
Access: Sat Jul 19 21:33:22 2003
Modify: Mon Feb 24 14:44:24 2003
Change: Thu Mar  6 08:34:41 2003

[root@server1 mail]# sendmail -v -bi -d44.4
safefile(/etc/sendmail.cf, uid=0, gid=0, flags=6000, mode=400):
safedirpath(/etc, uid=0, gid=0, flags=6000, level=0, offset=0):
        [dir /etc] OK
        [uid 0, nlink 1, stat 100644, mode 400]         OK
safefile(/etc/mail/local-host-names, uid=0, gid=0, flags=6580, mode=400):
safedirpath(/etc/mail, uid=0, gid=0, flags=6580, level=0, offset=0):
        [dir /etc/mail] OK
        [uid 0, nlink 1, stat 100644, mode 400]         OK
safefile(/etc/mail/relay-domains, uid=0, gid=0, flags=6580, mode=400):
safedirpath(/etc/mail, uid=0, gid=0, flags=6580, level=0, offset=0):
        [dir /etc/mail] OK
        [uid 0, nlink 1, stat 100644, mode 400]         OK
safefile(/etc/mail/trusted-users, uid=8, gid=12, flags=6580, mode=400):
safedirpath(/etc/mail, uid=8, gid=12, flags=6580, level=0, offset=0):
        [dir /etc/mail] OK
        [uid 0, nlink 1, stat 100644, mode 40]  OK
safefile(/etc/mail/service.switch, uid=8, gid=12, flags=6480, mode=400):
safedirpath(/etc/mail, uid=8, gid=12, flags=6580, level=0, offset=0):
        [dir /etc/mail] OK
        No such file or directory
safefile(/etc/mail/service.switch, uid=8, gid=12, flags=6480, mode=400):
safedirpath(/etc/mail, uid=8, gid=12, flags=6580, level=0, offset=0):
        [dir /etc/mail] OK
        No such file or directory
safedirpath(/var/spool/mqueue, uid=8, gid=12, flags=0, level=0, offset=
0):
        [dir /var/spool/mqueue] OK
safefile(/etc/mail/aliases.minorfish, uid=8, gid=12, flags=7c80, mode=
600):
safedirpath(/etc/mail, uid=8, gid=12, flags=7d80, level=0, offset=0):
        [dir /etc/mail] OK
        [uid 0, nlink 1, stat 100644, mode 6]   EACCES
safefile(/etc/mail/aliases.minorfish, uid=8, gid=12, flags=7c80, mode=
400):
safedirpath(/etc/mail, uid=8, gid=12, flags=7d80, level=0, offset=0):
        [dir /etc/mail] OK
        [uid 0, nlink 1, stat 100644, mode 4]   OK
warning: cannot lock /etc/mail/aliases.minorfish: Error 0
safefile(/etc/mail/aliases.minorfish.db, uid=8, gid=12, flags=3c6, mode=
200):
safedirpath(/etc/mail, uid=8, gid=12, flags=3c6, level=0, offset=0):
        [dir /etc/mail] OK
        No such file or directory
        [final dir /etc/mail uid 0 mode 40755] Permission denied
hash map "Alias2": unsafe map file /etc/mail/aliases.minorfish.db: 
Permission denied
WARNING: cannot open alias database /etc/mail/aliases.minorfish
Cannot create database for alias file /etc/mail/aliases.minorfish
safefile(/etc/mail/aliases, uid=8, gid=12, flags=7c80, mode=600):
safedirpath(/etc/mail, uid=8, gid=12, flags=7d80, level=0, offset=0):
        [dir /etc/mail] OK
        [uid 0, nlink 1, stat 100644, mode 6]   EACCES
safefile(/etc/mail/aliases, uid=8, gid=12, flags=7c80, mode=400):
safedirpath(/etc/mail, uid=8, gid=12, flags=7d80, level=0, offset=0):
        [dir /etc/mail] OK
        [uid 0, nlink 1, stat 100644, mode 4]   OK
warning: cannot lock /etc/mail/aliases: Error 0
safefile(/etc/mail/aliases.db, uid=8, gid=12, flags=3c6, mode=200):
safedirpath(/etc/mail, uid=8, gid=12, flags=3c6, level=0, offset=0):
        [dir /etc/mail] OK
        No such file or directory
        [final dir /etc/mail uid 0 mode 40755] Permission denied
hash map "Alias0": unsafe map file /etc/mail/aliases.db: Permission 
denied
WARNING: cannot open alias database /etc/mail/aliases
Cannot create database for alias file /etc/mail/aliases
safefile(/etc/mail/aliases.log, uid=8, gid=12, flags=7c80, mode=600):
safedirpath(/etc/mail, uid=8, gid=12, flags=7d80, level=0, offset=0):
        [dir /etc/mail] OK
        [uid 0, nlink 1, stat 100644, mode 6]   EACCES
safefile(/etc/mail/aliases.log, uid=8, gid=12, flags=7c80, mode=400):
safedirpath(/etc/mail, uid=8, gid=12, flags=7d80, level=0, offset=0):
        [dir /etc/mail] OK
        [uid 0, nlink 1, stat 100644, mode 4]   OK
warning: cannot lock /etc/mail/aliases.log: Error 0
safefile(/etc/mail/aliases.log.db, uid=8, gid=12, flags=3c6, mode=200):
safedirpath(/etc/mail, uid=8, gid=12, flags=3c6, level=0, offset=0):
        [dir /etc/mail] OK
        [uid 0, nlink 1, stat 100644, mode 2]   EACCES
hash map "Alias1": unsafe map file /etc/mail/aliases.log.db: Permission 
denied
WARNING: cannot open alias database /etc/mail/aliases.log
Cannot create database for alias file /etc/mail/aliases.log


0
Reply aloftus1 (1) 7/20/2003 2:34:49 AM

See related articles to this posting


andy  wrote:
> When running 'sendmail -v -bi -d44.4' I am getting "...unsafe map 

Which sendmail version is this?

> file..." errors.  (See output below).

> [root@server1 mail]# sendmail -v -bi -d44.4
> safefile(/etc/sendmail.cf, uid=0, gid=0, flags=6000, mode=400):

> safefile(/etc/mail/trusted-users, uid=8, gid=12, flags=6580, mode=400):

Do you use RunAsUser?

> safefile(/etc/mail/aliases.minorfish, uid=8, gid=12, flags=7c80, mode=
> 600):

> hash map "Alias2": unsafe map file /etc/mail/aliases.minorfish.db: 
> Permission denied

> hash map "Alias0": unsafe map file /etc/mail/aliases.db: Permission 
> denied
> WARNING: cannot open alias database /etc/mail/aliases

> warning: cannot lock /etc/mail/aliases.log: Error 0
> safefile(/etc/mail/aliases.log.db, uid=8, gid=12, flags=3c6, mode=200):

What are the permissions of those files?

ls -l /etc/mail/aliases*

-- 
A: Maybe because some people are too annoyed by top-posting.
Q: Why do I not get an answer to my question(s)?
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
0
Reply Claus 7/29/2003 4:50:01 AM
comp.mail.sendmail 13413 articles. 2 followers. Post

1 Replies
399 Views

Similar Articles

[PageSpeed] 7


  • Permalink
  • submit to reddit
  • Email
  • Follow


Reply:

Similar Artilces:

dbm map "Alias0": unsafe map file
Hello, I am looking for some assistance on a sendmail upgrade issue I'm having on HP-UX 11i. I have seen several posting on this but nothing I've read has resolved my issue. I upgraded from 8.13.3 to 8.13.6 and am receiving the following message in mail.log when sending email - SYSERR(root): dbm map "Alias0": missing map file /etc/mail/aliases DSN: dbm map "Alias0": missing map file /etc/mail/aliases Cannot create database for alias file /etc/mail/aliases I have changed the permissions per the documentation and get the same message running sendmail -v -bi. #chmo...

"Permission denied" while reading file /proc/<pid>/maps with permissions '-r--r--r--'
Hi, Could anybody explain why we have 'Permission denied' here? Thanks > uname -a Linux machine1 2.6.32-279.el6.x86_64 #1 SMP Wed Jun 13 18:24:36 EDT 2012 x86_64 x86_64 x86_64 GNU/Linux > id uid=75308(user1) gid=100(users) groups=100(users) > ps -ef | grep 25796 root 25796 15752 0 15:11 pts/30 00:00:00 ssh -l root machine2 user1 26737 13908 0 15:19 pts/23 00:00:00 grep 25796 > ls -ld /proc/25796/maps -r--r--r-- 1 root root 0 Oct 2 15:12 /proc/25796/maps > cat /proc/25796/maps cat: /proc/25796/maps: Permission denied Alex V...

Linux: "Permission denied" while reading file /proc/<pid>/maps with permissions '-r--r--r--'
Hi, Could anybody explain why we have 'Permission denied' here? Thanks > uname -a Linux machine1 2.6.32-279.el6.x86_64 #1 SMP Wed Jun 13 18:24:36 EDT 2012 x86_64 x86_64 x86_64 GNU/Linux > id uid=75308(user1) gid=100(users) groups=100(users) > ps -ef | grep 25796 root 25796 15752 0 15:11 pts/30 00:00:00 ssh -l root machine2 user1 26737 13908 0 15:19 pts/23 00:00:00 grep 25796 > ls -ld /proc/25796/maps -r--r--r-- 1 root root 0 Oct 2 15:12 /proc/25796/maps > cat /proc/25796/maps cat: /proc/25796/maps: Permission de...

Policy file permission grant not working for sun.misc.Unsafe
Hi, I have a code which has to use sun.misc.Unsafe class. It gives me SecurityException when I try Unsafe.getUnsafe(). In the comments written in the source code for Unsafe, it says that this exception will be thrown if securityManager's "checkPropertiesAccess()" method fails. I granted all the permissions to my code via policy file, and "checkPropertiesAccess()" does not throw any exception, but Unsafe.getUnsafe() still throws that exception. What can I do about that? Any help is greatly appreciated. Thanks ...

STARTTLS=client: file /etc/mail/tls/sendmail-common.key unsafe: Permission denied
I just upgraded from 8.12.3 to 8.12.11 and I get the following errors on startup: STARTTLS=client: file /etc/mail/tls/sendmail-common.key unsafe: Permission denied The permissions for the file are: -r-------- 1 root smmsp sendmail-common.key The permissions for the directory are: drwxr-xr-x 2 root smmsp 432 Jan 25 12:39 tls What is the fix? I have tried all the obvious group/ownership permissions changes and can't get it to work... I ran the debug for sendmail: sendmail -bs -d44.8 results: safefile(/etc/mail/submit.cf, uid=0, gid=0, flags=6000, mode=400): safedi...

Reading of file by next of map file and by next of file descriptor.
How many times is map file faster than reading of file by next of file descriptor and when both times are so aqual one? Thanks in advance. * Mirosław Makowiecki: > How many times is map file faster than reading of file by next of file > descriptor and when both times are so aqual one? > Thanks in advance. Measure. -- A: Because it messes up the order in which people normally read text. Q: Why is it such a bad thing? A: Top-posting. Q: What is the most annoying thing on usenet and in e-mail? ...

File permissions
Hi, I traced a problem on a friend's computer, XP SP2 Home, to a single file which somehow has no owner. His mail reader (eudora) can't read it and crashes, and I can't delete the file. Is there a way to log in as root or administrator on XP Home? If I boot up from a floppy, BartPE CD, etc., will I be able to delete the file or change owners? Any suggestions? I'm afraid he lives in another state and isn't comfortable with computers, so I can't give you too many details, but any suggestions or ideas on where to look would be appreciated. T...

Can I map with memory-mapped-file, a file that is dynamically expands?
Hi I have a task to monitor a text file that receives line of integers into it, every 200msec. I need to monitor it and thought maybe to map the file to the memory. Unfortunatly I didn't receive memory-mapped-file pointer to this file(while running,only when I stopped the application of the file it allowed me to create MMF of the file). Another thing, I can't use SetFilePointer with pointer to MMF, is there another way I can achive immidiatly the end of the MMF I've mapped? If anyone has a suggestion how to overcome this problem,I'll appriciate it very much. Dan...

Copying Files and retaining File Permission
Hi, I need to transfer files from ServerA to ServerB. ServerA is the domain controller, and ServerB is the Additional domain controller in the same domain. What is the easiest way to do this? There are folders with ACL granted to domain users. Server A - Windows 2000 Server Server B - Windows 2003 Server Domain - linx.local If I use traditional way to transfer files, it will lose all the permission, and stop halfway if the file is in use. Any software to skip file in use during copy and report the files in log files? I have heard of RoboCopy. Is it useful in this situation, and any guides ...

Mapping file-not-found to a .rb file?
I am using latest Apache on Linux. I would like to have something like this: localhost/query localhost/query/foobar All these should be mapped to a specific .rb file but I wonder which limitation this would have (I'd want to have as few restrictions as possible), and how to make this even possible at all. Would this require mod_rewrite or are there simpler alternatives? Preferrable I would not want to run a daemon .rb file. -- Posted via http://www.ruby-forum.com/. Marc Heiler wrote: > Would this require > mod_rewrite or are there simpler alternatives? Preferrable I would n...

File Permissions of PHP Session Files
Hi! I noticed that the file permissions (unix) of the PHP session files have only read and write permissions for the Apache process (600 or rw- --- ---). Does anyone have any idea where this permission is set ? I can't find any umask or chmod settings for it in the php.ini file. Can't find anything in the httpd.conf either. Is it set in the PHP code that implements session_start()? Thanks for any pointers Those files are created and modified by the the apache process, so you probably want the umask of that user (most likely "nobody"). Just out of curiosity, why do you...

memory mapped files
hi, quick question: is there an upper limit of how many memory mapped files there can be created ? On Sat, 17 Mar 2007 13:29:53 +0100, "Niel Darren" <nods@pszzxasm.co.uk> wrote: >hi, > >quick question: is there an upper limit of how many memory mapped files >there can be created ? > There is no limit to the actual count of memory mapped files you can have in a single process, but the limit is dictated by how much contigous virtual memory you have available to you. This will depend on what dll's you already have loaded and your apps...

file permissions on files created with lotofile
when using lotofile the files created (on linux) get permissions 600 owned by informix:informix. this prohibits scenarios where for example a web server will be able to read these files by being in the same group as the directory, with group sticky bit on, where these files get created. normally the sitcky bit would make sure the file created in that directory would be accessible by members of the same group. the functions neither follows permissions as set by umask during server startup. 1. can these permissions be controlled through informix? 2. any suggestions for above mentione...

Copying Files and retaining File Permission
Hi, I need to transfer files from ServerA to ServerB. ServerA is the domain controller, and ServerB is the Additional domain controller in the same domain. What is the easiest way to do this? There are folders with ACL granted to domain users. Server A - Windows 2000 Server Server B - Windows 2003 Server Domain - linx.local If I use traditional way to transfer files, it will lose all the permission, and stop halfway if the file is in use. Any software to skip file in use during copy and report the files in log files? I have heard of RoboCopy. Is it useful in this situation, and any guides ...

How can I change file permissions on gazillions of files?
I used CCC to clone my failing hard drive and it seemed everything was OK until I discovered that 3 levels down all the permissions were changed to "system". Ugh! Yes I ran Disk Utility before and after and I followed all the steps for CCC exactly as instructed. I am not saying this was CCC's fault. Maybe I inadvertantly missed something despite my care or maybe something was wrong at the disk level. I have no idea but I just want to know how to fix it. Please don't tell me I am stuck with changing several hundred thousand files individually. Madeleine Madwen ...

file descriptor and file reference number mapping
There are times when you want to use low level unix system calls in your carbon application. It's trivial but some syscalls needs file descriptor and you only have file reference number (got from HOpenDF, FSpOpenDF etc..) at hand. There is no official way to map this filerefnum to file descriptor. There is a hack available to do the mapping between these 2 numbers. { int fd = open(filename, flags); close(fd); short int fileRef= HOpenDF()/FSOpenFork()/FSpOpenDF; // now fd corresponds to fileRef. fstat(fd); // It will work. } The reason for this behavior is open() syscall...

file mapping mixing with regular file i/o
Hi, I have a binary file with a header followed by an array of records. I wish to memory map the header, while using read/write i/o operations on the records. The file will most definitely be growing and shrinking and so memory mapping the entire file is out of the question (right?). Will this work? The docs for CreateFileMapping seem a bit vauge stating only that mixing the two access methods will result in an "inconsistent" view of the file. But I plan only to access the header via memory map, and the records only with file i/o. This is intended to facilitate mul...

File Permissions ???? 0821-067 ping: The socket creation call failed.: The file access permissions do not allow the specified action
Howdy to all AIX Gurus � Have inherited a machine and not knowing too much about AIX I am now experiencing an issue with AIX version 5.1 on a IBM E-Server machine � Having previously removed the /home filesystem in order to create space to extend the /usr � Have recreated the /home and copied the users files back in to it (using smit to recreate it) using the following commands. mklv -y'hd7' -t'jfs2' rootvg 316 hdisk0 I then use this logical volume to create a filesystem using the following�. crfs -v jfs2 -d'hd7' -m'/home' -A''`locale yesstr | awk -F...

File permissions; copying file from one directory to another
Hey guys... I'm a bit inexperienced with Linux, so I've been struggling with this scenario; I have a web app that creates a temporary data file (under the web daemons user info - apache) in the temp directory, called - for example - bla Its just a file with some text in it. The web app creates the data file, and then I want to move it to another directory, /var/spool/processor/outgoing I'm getting permission denied trying to copy "bla" from the temp directory (/var/tmp) to the above directory. I've set the "outgoing" directory prermissions world writea...

setting default file permissions for every file created
Hi Not sure if this is the right group for this questions, so apologies in advance. My problem is that I have a small 3 Mac network set up, and I want to have a central file server on one of the machines, so that any file created on any machine can be accessed, modified and saved without having 3 copies of it floating around. I have set up the network so all mahines can see the folder I wish to use and I have created a group with each user in it, using sharepoints, allowing the R&W permission for that folder. But as soon as I create a file (say a word doc) it is given only read only pe...

File Permission Error (8) when trying to delete file
I am trying to programmatically delete (using the delete fx) a config(.ini) file that was originally created using the Open/Create/Replace fx. The file directory path is correct and the file is closed prior to the delete operation. I get a file permission error (8) when attempting the delete operation. I even tried adjusting the file access rights for full to see if that would make a difference but it did not. I am at this point not able to identify why I am getting this error, but I suspect it is something obvious. Your thoughts are appreciated. Thanks, Don Don, could you post the c...

File permission with datapump file (Oracle 10G Release2)
Hello, I have a problem that I can't resolve. I hope that someone have a response. I use the package DBMS_DATAPUMP to do an export of my database into a file. The export operation is done correctly and the file appears correctly on the UNIX filesystem. Here is the output of the "ls -l" command : -rw-r----- 1 oracle dba 614400 Jan 28 16:43 export.dmp The exported file permissions are set by default as shown below. The problem is that I have to do some actions that need write permissions on this file with a distant user via SSH (that user cannot be oracle). My que...

File permissions are different after file copy, for different users??
If I copy a file from an another machine to my machine, it gets certain permissions(Writable). If my colleague who is using a different login copies the file from the same remote machine to his local PC, the permissions are different(Readble) compared to what happened with my login. What could be the problem? What setting exactly controls that? Is that something similar to umask in UNIX? qazmlp1209@rediffmail.com wrote: > If I copy a file from an another machine to my machine, it gets certain > permissions(Writable). > If my colleague who is using a different login copies...

Telling to Linker Command File based on MAP file
Hi, I need to tell application 'A' to use the unused space of application 'B' . >From the MAP file of application 'B', i know the amount of memory used , but this info has to be told to application 'A'. How to tell my Linker Command FIle (Linker Scripts) of application 'A' that the application 'B' has some amount of Unused memory in a certain region and so the application 'A' can use that memory ? Any ideas ? Thx in advans, Karthik Balaguru On Jan 24, 2:44 pm, "karthikbg" <karthik.balag...@lntinfo...