FIle permission error

App Versions

{
	"erpnext": "15.46.1",
	"frappe": "15.50.1",
	"gameplan": "0.0.1",
	"hrms": "15.36.1",
	"india_compliance": "15.14.5",
	"insights": "2.2.9",
	"payments": "0.0.1"
}

Route

Form/File/9ea91f1621

Traceback

Traceback (most recent call last):
  File "apps/frappe/frappe/app.py", line 114, in application
    response = frappe.api.handle(request)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/api/__init__.py", line 49, in handle
    data = endpoint(**arguments)
           ^^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/api/v1.py", line 36, in handle_rpc_call
    return frappe.handler.handle()
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/handler.py", line 50, in handle
    data = execute_cmd(cmd)
           ^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/handler.py", line 86, in execute_cmd
    return frappe.call(method, **frappe.form_dict)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/__init__.py", line 1726, in call
    return fn(*args, **newargs)
           ^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/utils/typing_validations.py", line 31, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/desk/form/save.py", line 39, in savedocs
    doc.save()
  File "apps/frappe/frappe/model/document.py", line 342, in save
    return self._save(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/model/document.py", line 378, in _save
    self.run_before_save_methods()
  File "apps/frappe/frappe/model/document.py", line 1103, in run_before_save_methods
    self.run_method("validate")
  File "apps/frappe/frappe/model/document.py", line 974, in run_method
    out = Document.hook(fn)(self, *args, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/model/document.py", line 1334, in composer
    return composed(self, method, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/model/document.py", line 1316, in runner
    add_to_return_value(self, fn(self, *args, **kwargs))
                              ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/model/document.py", line 971, in fn
    return method_object(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/core/doctype/file/file.py", line 126, in validate
    self.handle_is_private_changed()
  File "apps/frappe/frappe/core/doctype/file/file.py", line 279, in handle_is_private_changed
    frappe.db.set_value(
  File "apps/frappe/frappe/database/database.py", line 990, in set_value
    query.run(debug=debug)
  File "apps/frappe/frappe/query_builder/utils.py", line 87, in execute_query
    result = frappe.db.sql(query, params, *args, **kwargs)  # nosemgrep
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/database/database.py", line 230, in sql
    self._cursor.execute(query, values)
  File "env/lib/python3.11/site-packages/pymysql/cursors.py", line 153, in execute
    result = self._query(query)
             ^^^^^^^^^^^^^^^^^^
  File "env/lib/python3.11/site-packages/pymysql/cursors.py", line 322, in _query
    conn.query(q)
  File "env/lib/python3.11/site-packages/pymysql/connections.py", line 563, in query
    self._affected_rows = self._read_query_result(unbuffered=unbuffered)
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "env/lib/python3.11/site-packages/pymysql/connections.py", line 825, in _read_query_result
    result.read()
  File "env/lib/python3.11/site-packages/pymysql/connections.py", line 1199, in read
    first_packet = self.connection._read_packet()
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "env/lib/python3.11/site-packages/pymysql/connections.py", line 775, in _read_packet
    packet.raise_for_error()
  File "env/lib/python3.11/site-packages/pymysql/protocol.py", line 219, in raise_for_error
    err.raise_mysql_exception(self._data)
  File "env/lib/python3.11/site-packages/pymysql/err.py", line 150, in raise_mysql_exception
    raise errorclass(errno, errval)
pymysql.err.OperationalError: (1054, "Unknown column 'attach_bill' in 'SET'")

Request Data

{
	"type": "POST",
	"args": {
		"doc": "{\"name\":\"9ea91f1621\",\"owner\":\"MKMUNIS#####@GMAIL.COM\",\"creation\":\"2024-11-12 13:31:35.418850\",\"modified\":\"2024-11-12 13:31:35.418850\",\"modified_by\":\"MKMUNIS#####5@GMAIL.COM\",\"docstatus\":0,\"idx\":0,\"file_name\":\"IMG_20241112_132955.jpg\",\"is_private\":0,\"file_type\":\"JPG\",\"is_home_folder\":0,\"is_attachments_folder\":0,\"file_size\":105019,\"file_url\":\"/private/files/IMG_20241112_132955.jpg\",\"folder\":\"Home\",\"is_folder\":0,\"attached_to_doctype\":\"Cash Book\",\"attached_to_name\":\"new-cash-book-lofsxkpvuf\",\"attached_to_field\":\"attach_bill\",\"content_hash\":\"2750596861f91800f4416fa1ab041f23\",\"uploaded_to_dropbox\":0,\"uploaded_to_google_drive\":0,\"doctype\":\"File\",\"__last_sync_on\":\"2024-12-19T12:18:10.655Z\",\"__unsaved\":1}",
		"action": "Save"
	},
	"btn": {
		"jQuery370007035382214812681": {
			"events": {
				"click": [
					{
						"type": "click",
						"origType": "click",
						"guid": 6043,
						"namespace": ""
					}
				]
			}
		}
	},
	"freeze": true,
	"headers": {},
	"error_handlers": {},
	"url": "/api/method/frappe.desk.form.save.savedocs",
	"request_id": "e4dbdf64-e1f1-44f0-9676-85884038b532"
}

Response Data

{
	"exception": "pymysql.err.OperationalError: (1054, \"Unknown column 'attach_bill' in 'SET'\")",
	"exc_type": "OperationalError"
}