A computer-implemented method for operating a virtual machine on a smart card over a file system of the smart card, the file system being a process for storing and organizing data objects for manipulation and retrieval by the operating system of the smart card, the file system organizing flash memory of the smart card into blocks to store data and is used as a frontend for all entities of a smart card to access the flash memory to store long-term data, - whereby the file system comprises a plurality of file system nodes (FSN1-FSN13), each of said file system nodes being a file, a directory or a symbolic link, - whereby each file system node is assigned with a first user-ID (U-ID A, U-ID B) and/or a first group-ID (G-ID T), - whereby one or more first application programs are running on the virtual machine, the method comprising the steps of: - assigning at least one of the first application programs a second user-ID (U-ID A', U-ID B') and/or a second group-ID (G-ID T'), - accessing at least one of the plurality of file system nodes by the virtual machine for providing read and/or write access for the at least one first application program to said at least one file system node, - evaluating, by the file system, the first user-ID and/or first group-ID of the at least one file system node and the second user-ID and/or group-ID of said at least one first application program, whereby the evaluation returns a positive result only if at least one of a set of conditions applies, the at least one condition being selected from the group consisting of: ▪ if the first user-ID of said file system node matches the assigned second user-ID, or ▪ if the second user-ID is a super-user-ID, or ▪ if the second group-ID is a super-group-ID, or ▪ if the first group-ID of said file system node matches the assigned second group-ID, or ▪ if the user being assigned the second user-ID belongs to a user group owning the assigned first group-ID of said file system node, or ▪ if the file system node is marked as globally accessible, and whereby the evaluation returns a negative result if none of said condition applies, - granting access by the file system to the at least one first application program to said at least one file system node in case the evaluation result is positive, and - prohibiting by the file system the at least one first application program from accessing said at least one file system node if the evaluation result is negative. - whereby the file system comprises a plurality of file system nodes (FSN1-FSN13), each of said file system nodes being a file, a directory or a symbolic link, - whereby each file system node is assigned with a first user-ID (U-ID A, U-ID B) and/or a first group-ID (G-ID T), - whereby one or more first application programs are running on the virtual machine, - assigning at least one of the first application programs a second user-ID (U-ID A', U-ID B') and/or a second group-ID (G-ID T'), - accessing at least one of the plurality of file system nodes by the virtual machine for providing read and/or write access for the at least one first application program to said at least one file system node, - evaluating, by the file system, the first user-ID and/or first group-ID of the at least one file system node and the second user-ID and/or group-ID of said at least one first application program, whereby the evaluation returns a positive result only if at least one of a set of conditions applies, the at least one condition being selected from the group consisting of: ▪ if the first user-ID of said file system node matches the assigned second user-ID, or ▪ if the second user-ID is a super-user-ID, or ▪ if the second group-ID is a super-group-ID, or ▪ if the first group-ID of said file system node matches the assigned second group-ID, or ▪ if the user being assigned the second user-ID belongs to a user group owning the assigned first group-ID of said file system node, or ▪ if the file system node is marked as globally accessible, and whereby the evaluation returns a negative result if none of said condition applies, ▪ if the first user-ID of said file system node matches the assigned second user-ID, or ▪ if the second user-ID is a super-user-ID, or ▪ if the second group-ID is a super-group-ID, or ▪ if the first group-ID of said file system node matches the assigned second group-ID, or ▪ if the user being assigned the second user-ID belongs to a user group owning the assigned first group-ID of said file system node, or ▪ if the file system node is marked as globally accessible, - granting access by the file system to the at least one first application program to said at least one file system node in case the evaluation result is positive, and - prohibiting by the file system the at least one first application program from accessing said at least one file system node if the evaluation result is negative.