Change the FlashCom Recorded FLV File Permission in Linux

In Linux server, the FLV recorded by FlashCom, file permission by default is 0660 (rw-rw—-). Tonight, I did some jpg screen capture from the video frame using FFmpeg through exec in PHP. It is so strange the conversion never success. Firstly, I thought it is PHP permission problem, I found I can run exec on FFmpeg -version without problem. Next, I thought it was the jpg saved folder forgot to set a write permission, I checked that I have done. Thirdly, I wondered is it FlashCom locks the just created FLV, but after restart FlashCom, it was still not work.

So, I try to use php exec FFmpeg on some FLV encoded in video encoder. Oh, the conversion is work without any problem. Therefore, I sure it was the problem on the FlashCom recorded FLV, I thought may be the file ownership problem but finally find out it is the file permission problem, “Other” has no right to read the file.

My immediate reaction was using chmod in php to change it to 664 (rw-rw-r–), but it come out php error said it does not have such right to chmod on the file. I think FlashCom should not such stubborn cannot change file permission. I scan through all the XML configuration files. I find Server.xml: <Mask>017</Mask> for setting the file permission. It is octal format, by 666 – x = wanted permission. I want 664, so 666-664, x=2, I change that line to:
<Mask>002</Mask>

Save and restart FlashCom, all the problems solved 🙂

4 Replies to “Change the FlashCom Recorded FLV File Permission in Linux”

  1. Thanks for posting it. I was similar problem, was lazy enough to scan through all xml files. Googled the problem and found the exact solution on your blog.

    Thanks again.

    -abdul

  2. hey i tried to change mask to 022 but it doesn’t take any effect. I am running edgy and fms as root. Is there something else I need to configure here? Thanks In advance

  3. Hi, Which XML file is it in? I dont understand which file i am supposed to edit. can’t find a file called server.xml

    Andy

Comments are closed.