1szheng / pe

0 stars 0 forks source link

Program fails when having permission issues #16

Open 1szheng opened 2 years ago

1szheng commented 2 years ago

If the program is launched with the /data folder having no write permission, before the save data file has been created, an exception will be thrown on the first command executed.

image.png

image.png

image.png

nus-pe-script commented 2 years ago

Team's Response

I think this counts as extreme user behaviour.

Moreover, if the data file cannot be written to, no data is corrupted.

image.png

In the first place, you would place the jar file in a folder you can write to. (inherited permissions)

A normal user wouldn't specifically deny write permissions to the "data" folder only.

Therefore, "data" should be writeable to. Otherwise, the jar file can't even be written to the folder for execution.

Items for the Tester to Verify

:question: Issue response

Team chose [response.Rejected]

Reason for disagreement: This is not an extreme user behavior, the screenshots shown are steps to replicate the lack of permission checking.

While its true that permissions are inherited, this usually applies to the Windows operating system.

In the Linux operating system, the newly created files are based on permissions generated with some user, group and default umask settings that I am not too familiar with but know exists.

In the following screenshot I tried setting the PE folder with 744, JAR file with 544 and renamed the original data file such that a new one would be created. Note the yellow boxes that the permissions are in fact not inherited but based on some possible admin settings which users may not have access to by default.

This means that it is absolutely possible for this bug to occur without any user intervention and could be more common than it seems, since the OS X operating system could behave similarly to a Linux based one.

image.png

Additionally, even if it is a user's extreme behavior, the application should not crash.

image.png