File Permission Always remains same

I have tried each methods mentioned in all the other threads, but every time i am getting same file permission after uploading the file. I am stuck with it from last two days, what am i missing?

Are you deleting the uploaded file each time after every upload? If you do not delete it, the permissions can stay the same.

Yes i have tried deleting them and i have also tried uploading the files with different filename but still getting same file permission.

Have you set any flags in vsftpd.conf which changes file permissions?

@shashi have you checked all servers v1 to v7?

Yes i have tried both the ways :
1 : Without changing any flags in the vsftpd.conf
2 : By changing two flags mask and file mode,
but the file permission remains same in both cases.

Yes i have checked for all the servers. But two servers are faulty, i.e they have problems in uploading so except them i am checking for all.

Here is the general flow you can follow.

  1. Upload file.
  2. Check permission, compare with baseline version and note it.
  3. Delete uploaded file.
  4. Go back to step 1 with next version.
    Kindly do the above with versions 2 to 7 and let me know, you will surely find the faulty version.

NOTE: It is possible that the server is not terminating properly in the background after upload. Kindly manually check after each upload using ps -ef and kill the server if it still running.

do i need to set those flags in vsftpd.conf before or after attempting these steps?

Do not set any flags. Because we need to check which version is faulty. By setting the flags, we are trying to correct the permissions.

Hey, you don’t have to set any new flags in the config file, There is a version of vsftpd which changes the file permission as compared to the baseline version.
You have to track which version is different, you are surely making some error while uploading the file.

And for comparing the file permission, we have to check the file permission of the file to be uploaded from ftp_server folder (suppose test.img ) and the file permission of the uploaded file inside ftp_client folder (i.e test.img ), and then compare them every time, Am i right?

No, see you’ve got it wrong. You need to compare the uploaded file of the baseline version with the uploaded file of every other version.

The file permission of uploaded file of version1 needs to be refered as baseline irrespective of file permission of the file before upload.

I tried all the steps very sincerely but still for all the uploaded file i am getting the same permission
(i.e: -rw-r–r-- ) and the uploaded file of baseline version also have same permission (i.e: -rw-r–r--).

Did you check if server is still running after upload.

I give you one suggestion firstly give all the file permission to your text file and check for every version. And compare the file permission of every version if it is different. Then go ahead

yes i verified at each step

Go through all the previous replies to this post, you are definitely doing something wrong. There is atleast one faulty version.

Hey @shashi, Possibly that is the faulty version, right!