1

I am experiencing problems trying to zcat the contents of a particular gzip archive containing SQL text. The problem seems localised to one particular file on one server.

I have copied around 10 gzipped SQL files from our backup server using rsync to a new replication server that I am trying to restore them onto. In all but one case this has worked fine, simply piping the files using zcat into MySQL.

However, one file will not work. Attempting to perform any kind of read operation on the file all produce an error, "Operation not Permitted"

I can delete, chmod and chown the file and have ensured that I have full ownership and permissions on it. It's visible attributes appear to be identical to all of the other files that worked. I am also able to rename it and move it into different directories on the same disk. Attempting to copy the file, read it in any way, or move it to another disk however all generate the "Operation not permitted" Error. I have also tried to look at the attributes using lsattr, but this also generates the same error.

I can read the file on the original source server, and have also FTP'd it to my windows PC where it can also be read and extracted. I have even copied it from the original server via FTP to my PC and then back to the destination server via FTP and as soon as it hits the destination server I am unable to read it again.

My OS is CentOS 7 and The disk in question is a 100G LVM volume formatted in ext4. I have run fsck against it and it reports as clean.

Sadly the extracted SQL data file is too large to fit on the server along with the database that it is intended to create, and is effectively too large to stream the extraction over the network from another server.

Does anyone have any idea what might cause this behaviour? I am at a loss.

Thanks in advance.

  • Whats the permissions on the file? Also, what are the octals set to? – ryekayo Jun 2 '17 at 15:13
  • By default they are set to 0640, but I've tried changing to 0777 just to try and rule out permissions errors. The files are owned by my own user. Doesn't work under root or sudo either. – blimbeard Jun 2 '17 at 15:18
  • Ok, sometimes transferring files over from Windows to Linux can be troublesome... If you haven't looked into this yet, i would try looking at dos2unix – ryekayo Jun 2 '17 at 15:21
  • Thanks, but originally the file was rsynced from another linux server. Only tried copying it via Windows as an experiment, so it's not that I don't think. – blimbeard Jun 2 '17 at 15:23
0

Having re-visited this issue recently, I eventually figured out that in this case the problem was due to the McAffee EPO agent which had been installed on the server by our infrastructure team without my knowledge. This agent was blocking access to particular large files on the system including the one in question.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.